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

@@ -461,7 +461,7 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
tile_x_off = pWin->drawable.x;
tile_y_off = pWin->drawable.y;
#ifdef COMPOSITE
#if defined(COMPOSITE) || defined(ROOTLESS)
draw_x_off = pixmap->screen_x;
draw_y_off = pixmap->screen_y;
tile_x_off -= draw_x_off;