diff options
Diffstat (limited to 'miext/rootless/rootlessCommon.h')
-rw-r--r-- | miext/rootless/rootlessCommon.h | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h index d9a4d05e9..40400b395 100644 --- a/miext/rootless/rootlessCommon.h +++ b/miext/rootless/rootlessCommon.h @@ -226,20 +226,10 @@ extern RegionRec rootlessHugeRoot; * Can't access the bits before the first word of the drawable's data in * rootless mode, so make sure our base address is always 32-bit aligned. */ -#define SetPixmapBaseToScreen(pix, _x, _y) { \ - PixmapPtr _pPix = (PixmapPtr) (pix); \ - _pPix->devPrivate.ptr = (char *) (_pPix->devPrivate.ptr) - \ - ((int)(_x) * _pPix->drawable.bitsPerPixel/8 + \ - (int)(_y) * _pPix->devKind); \ - if (_pPix->drawable.bitsPerPixel != FB_UNIT) { \ - size_t _diff = ((size_t) _pPix->devPrivate.ptr) & \ - (FB_UNIT / CHAR_BIT - 1); \ - _pPix->devPrivate.ptr = (char *) (_pPix->devPrivate.ptr) - \ - _diff; \ - _pPix->drawable.x = _diff / \ - (_pPix->drawable.bitsPerPixel / CHAR_BIT); \ - } \ -} +#define SetPixmapBaseToScreen(pix, _x, _y) do { \ + pix->screen_x = _x; \ + pix->screen_y = _y; \ +} while(0) // Returns TRUE if this window is visible inside a frame // (e.g. it is visible and has a top-level or root parent) |