diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2018-06-07 17:55:21 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2018-06-08 11:18:30 +0200 |
commit | 10eec2ccb11701fe29ab246acd6c0bdc2991b775 (patch) | |
tree | a8539b96f3d422a0bd330884d16b481aefa5e187 /present | |
parent | 6300049a9a4b84789a2e8141f5cad17adf22185c (diff) |
present/wnmd: Preserve window pixmap's screen_x/y on flip
The incorrect values could result in the new pixmap's contents
getting corrupted down the line.
v2:
* Guard screen_x/y lines by #ifdef COMPOSITE
Bugzilla: https://bugs.freedesktop.org/106841
Fixes: 029608dd8020 "present: Add window flip mode"
Reviewed-by: Adam Jackson <ajax@redhat.com> # v1
Reviewed-by: Keith Packard <keithp@keithp.com> # v1
Reviewed-by: Roman Gilg <subdiff@gmail.com>
Tested-by: Olivier Fourdan <ofourdan@redhat.com> # v1
Diffstat (limited to 'present')
-rw-r--r-- | present/present_wnmd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/present/present_wnmd.c b/present/present_wnmd.c index 80ffb014e..035ae8ffe 100644 --- a/present/present_wnmd.c +++ b/present/present_wnmd.c @@ -469,6 +469,10 @@ 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 */ +#ifdef COMPOSITE + vblank->pixmap->screen_x = old_pixmap->screen_x; + vblank->pixmap->screen_y = old_pixmap->screen_y; +#endif present_set_tree_pixmap(toplvl_window, old_pixmap, vblank->pixmap); vblank->pixmap->refcnt++; dixDestroyPixmap(old_pixmap, old_pixmap->drawable.id); |