Skip to content

Make Xwayland resizing less glitchy

Vlad Zahorodnii requested to merge work/zzag/xwayland-better-resizing into master

XSYNC requests and wl_surface commits are unsynchronized. This results in the window bouncing when it's being resized. In order to address that, this change reworks how the synchronization is performed:

  • when a window is asked to resize, kwin will freeze wl_surface commits, send a sync request, and configure the window
  • after the client repaints the window, it acks the sync request
  • when kwin sees that the sync request has been acked, it will unfreeze the wl_surface commits. And here's the most important part: it will NOT update the window geometry until Xwayland commits something
  • when Xwayland commits the wl_surface, kwin will update the window geometry

It's important to wait until Xwayland commits the wl_surface because it can take a while until Xwayland commits the wl_surface. In meanwhile, kwin could compose a frame with the new window geometry but old wl_surface size.

BUG: 486464


Draft: not a fan of the new code

Edited by Vlad Zahorodnii

Merge request reports

Loading