[PATCH xserver] present/wnmd: Preserve window pixmap's screen_x/y on flip
Michel Dänzer
michel at daenzer.net
Thu Jun 7 16:27:16 UTC 2018
From: Michel Dänzer <michel.daenzer at amd.com>
The incorrect values could result in the new pixmap's contents
getting corrupted down the line.
Bugzilla: https://bugs.freedesktop.org/106841
Fixes: 029608dd8020 "present: Add window flip mode"
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
present/present_wnmd.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/present/present_wnmd.c b/present/present_wnmd.c
index 80ffb014e..1e3958bfc 100644
--- a/present/present_wnmd.c
+++ b/present/present_wnmd.c
@@ -469,6 +469,8 @@ present_wnmd_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
PixmapPtr old_pixmap = screen->GetWindowPixmap(window);
/* Replace window pixmap with flip pixmap */
+ vblank->pixmap->screen_x = old_pixmap->screen_x;
+ vblank->pixmap->screen_y = old_pixmap->screen_y;
present_set_tree_pixmap(toplvl_window, old_pixmap, vblank->pixmap);
vblank->pixmap->refcnt++;
dixDestroyPixmap(old_pixmap, old_pixmap->drawable.id);
--
2.17.1
More information about the xorg-devel
mailing list