mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
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:
@@ -125,7 +125,7 @@ exaGetDrawablePixmap(DrawablePtr pDrawable)
|
||||
void
|
||||
exaGetDrawableDeltas(DrawablePtr pDrawable, PixmapPtr pPixmap, int *xp, int *yp)
|
||||
{
|
||||
#ifdef COMPOSITE
|
||||
#if defined(COMPOSITE) || defined(ROOTLESS)
|
||||
if (pDrawable->type == DRAWABLE_WINDOW) {
|
||||
*xp = -pPixmap->screen_x;
|
||||
*yp = -pPixmap->screen_y;
|
||||
|
||||
@@ -963,7 +963,7 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||
RegionInit(&rgnDst, NullBox, 0);
|
||||
|
||||
RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc);
|
||||
#ifdef COMPOSITE
|
||||
#if defined(COMPOSITE) || defined(ROOTLESS)
|
||||
if (pPixmap->screen_x || pPixmap->screen_y)
|
||||
RegionTranslate(&rgnDst, -pPixmap->screen_x, -pPixmap->screen_y);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user