xserver/hw
Michel Dänzer 39e141eac0 xwayland: Replace window pixmap as needed for drawing operation
We must not modify the contents of a client pixmap.

If there's an available window buffer, we re-use that for the window
pixmap. Otherwise we just allocate a new one.

This also avoids Present client hangs due to xwl_present_buffer_release
not getting called for the buffer release event.

v2:
* Use xwl_pixmap_get_buffer_release_cb instead of keeping track of the
  flip pixmap in xwl_window.
* Dispose of xwl_window_buffer in xwl_window_swap_pixmap called from
  damage_report.
v3:
* Use xwl_window->surface_pixmap in damage_report.
v4:
* Don't re-use client pixmaps as window buffers.
* Clear xwl_window_buffer->pixmap before calling
  xwl_window_buffer_maybe_dispose in xwl_window_swap_pixmap, to prevent
  it from clearing the buffer release callback.
v5:
* Keep using xwl_window_buffers_get_pixmap in xwl_window_attach_buffer.
* Always keep a reference to the old window pixmap in _swap_pixmap,
  drop it in damage_report.

Fixes: 6779ec5bf6 ("xwayland: Use window pixmap as a window buffer")
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1633
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1644
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1314>
(cherry picked from commit 6b290fa5d9)
2026-01-19 12:32:20 -08:00
..
kdrive drop remains of support for old Sun compilers 2026-01-19 12:32:18 -08:00
vfb Xvfb: Support up to 13 mouse buttons 2024-01-08 11:16:11 +00:00
xfree86 include: unexport registry.h 2026-01-19 12:32:20 -08:00
xnest drop remains of support for old Sun compilers 2026-01-19 12:32:18 -08:00
xquartz xquartz: Disable COMPOSITE at runtime 2023-01-17 15:17:45 -08:00
xwayland xwayland: Replace window pixmap as needed for drawing operation 2026-01-19 12:32:20 -08:00
xwin xwin: winsock.h needs to be included earlier 2026-01-19 12:32:20 -08:00
meson.build Drop DMX DDX 2021-09-07 09:34:31 +00:00