Tried to remove it but does not work. Resizing the window with mouse generates ConfigureNotify events. If we call XResizeWindow with the dimensions we got from this event, we work against this. The window may already have a different size.