[PATCH xserver] xwayland: use pixmap size on present flip
Olivier Fourdan
ofourdan at redhat.com
Fri Jun 8 14:13:46 UTC 2018
If the pixmap size does not match the present box size, flickering
occurs.
This can happen when the client changes its size (e.g. switching to
fullscreen), and since the buffer is kept as long as the pixmap is
valid, once the buffer is created, it remains at the wrong (old) size
and causes continuous flickering.
Use the actual pixmap's drawable size instead of the present box to
create the buffer so that it's sized appropriately.
Bugzilla: https://bugs.freedesktop.org/106841
Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
---
hw/xwayland/xwayland-present.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c
index 4db0d1efc..32727310f 100644
--- a/hw/xwayland/xwayland-present.c
+++ b/hw/xwayland/xwayland-present.c
@@ -458,8 +458,8 @@ xwl_present_flip(WindowPtr present_window,
xwl_window->present_window = present_window;
buffer = xwl_glamor_pixmap_get_wl_buffer(pixmap,
- present_box->x2 - present_box->x1,
- present_box->y2 - present_box->y1,
+ pixmap->drawable.width,
+ pixmap->drawable.height,
&buffer_created);
event->event_id = event_id;
--
2.17.1
More information about the xorg-devel
mailing list