Skip to content

Avoid sending X11 sync request if new logical geometry doesn't change the device geometry

There are two mechanisms to throttle ConfigureNotify events during interactive resize:

  • either using XSync
  • or by a dummy QTimer

The QTimer approach is pretty straightforward: the wm configures the window, blocks the interactive resize operation and arms a timer to unblock it some time later in the future.

With the xsync approach, the wm sends an xsync request, makes a call to XConfigureWindow(), and blocks interactive resize until the xsync request is acked by the client. When the client sees the ConfigureNotify event, it is going to repaint and ack the xsync request. When the xsync request is acked, the wm will apply new geometry and unblock interactive resize.

After the scaling changes, the logical geometry can have some fractional part, which gets rounded when configuring the X windows. Due to that, it's possible to encounter the case where the logical geometry changes, but the native/device geometry does not due to std::round(). In that case, the wm should not send an xsync request because the client won't ack it because the device geometry has not changed.

BUG: 488223


A more long term goal: drop logical geometry in Xcb::Window and make it operate only with the device geometry to make the geometry manipulation code less error prone.

Merge request reports

Loading