rootless: Use screen_x and screen_y instead of pixmap pointer hacks

This updates rootless to treat pixmaps consistently with COMPOSITE,
using the screen_x and screen_y values rather than doing hacky math.

This will allow for proper bounds checking on a given PixmapRec.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
This commit is contained in:
Jeremy Huddleston Sequoia
2023-01-01 10:57:46 -08:00
parent 820b1dc461
commit 16e7cdba48
14 changed files with 28 additions and 32 deletions

View File

@@ -137,7 +137,7 @@ present_check_flip(RRCrtcPtr crtc,
/* Does the window match the pixmap exactly? */
if (window->drawable.x != 0 || window->drawable.y != 0 ||
#ifdef COMPOSITE
#if defined(COMPOSITE) || defined(ROOTLESS)
window->drawable.x != pixmap->screen_x || window->drawable.y != pixmap->screen_y ||
#endif
window->drawable.width != pixmap->drawable.width ||