xserver: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jul 18 14:38:01 UTC 2025
hw/xwayland/xwayland-present.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 010c00828a4fec4527f44e3d2a5d34e50dfe835b
Author: Michel Dänzer <mdaenzer at redhat.com>
Date: Wed Jul 16 16:30:53 2025 +0200
xwayland/present: Only flip if the window pixmap dimensions match
If they don't, attaching the new buffer changes the dimensions of the
wl_surface representing the window, which can break stuff as described
in https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2044 .
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2047>
diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c
index 07d58ee6a..dcacb8ee8 100644
--- a/hw/xwayland/xwayland-present.c
+++ b/hw/xwayland/xwayland-present.c
@@ -741,6 +741,7 @@ xwl_present_check_flip(RRCrtcPtr crtc,
WindowPtr toplvl_window = xwl_present_toplvl_pixmap_window(present_window);
struct xwl_window *xwl_window = xwl_window_from_window(present_window);
ScreenPtr screen = pixmap->drawable.pScreen;
+ PixmapPtr window_pixmap = screen->GetWindowPixmap(present_window);
if (reason)
*reason = PRESENT_FLIP_REASON_UNKNOWN;
@@ -761,9 +762,11 @@ xwl_present_check_flip(RRCrtcPtr crtc,
if (valid)
return FALSE;
- /* Flip pixmap must have same dimensions as window */
+ /* Flip pixmap must have same dimensions as the window and its pixmap */
if (present_window->drawable.width != pixmap->drawable.width ||
- present_window->drawable.height != pixmap->drawable.height)
+ present_window->drawable.height != pixmap->drawable.height ||
+ pixmap->drawable.width != window_pixmap->drawable.width ||
+ pixmap->drawable.height != window_pixmap->drawable.height)
return FALSE;
if (!xwl_pixmap_get_wl_buffer(pixmap))
@@ -781,7 +784,7 @@ xwl_present_check_flip(RRCrtcPtr crtc,
* window's, e.g. because a client redirected this window or one of its
* parents.
*/
- if (screen->GetWindowPixmap(xwl_window->surface_window) != screen->GetWindowPixmap(present_window))
+ if (screen->GetWindowPixmap(xwl_window->surface_window) != window_pixmap)
return FALSE;
/*
More information about the xorg-commit
mailing list