diff options
-rw-r--r-- | miext/rootless/rootlessCommon.h | 2 | ||||
-rw-r--r-- | miext/rootless/rootlessWindow.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h index 034d563c6..a92f1f1e4 100644 --- a/miext/rootless/rootlessCommon.h +++ b/miext/rootless/rootlessCommon.h @@ -238,7 +238,7 @@ extern RegionRec rootlessHugeRoot; ((int)(_x) * _pPix->drawable.bitsPerPixel/8 + \ (int)(_y) * _pPix->devKind); \ if (_pPix->drawable.bitsPerPixel != FB_UNIT) { \ - unsigned _diff = ((unsigned) _pPix->devPrivate.ptr) & \ + size_t _diff = ((size_t) _pPix->devPrivate.ptr) & \ (FB_UNIT / CHAR_BIT - 1); \ _pPix->devPrivate.ptr = (char *) (_pPix->devPrivate.ptr) - \ _diff; \ diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index 9f74718f5..1b202e12e 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -63,6 +63,8 @@ extern int darwinMainScreenX, darwinMainScreenY; #define SCREEN_TO_GLOBAL_Y 0 #endif +#define MAKE_WINDOW_ID(x) ((xp_window_id)((size_t)(x))) + #define DEFINE_ATOM_HELPER(func,atom_name) \ static Atom func (void) { \ static unsigned int generation = 0; \ @@ -134,7 +136,7 @@ void RootlessNativeWindowMoved (WindowPtr pWin) { winRec = WINREC(pWin); - if (xp_get_window_bounds ((xp_window_id)winRec->wid, &bounds) != Success) return; + if (xp_get_window_bounds (MAKE_WINDOW_ID(winRec->wid), &bounds) != Success) return; sx = dixScreenOrigins[pWin->drawable.pScreen->myNum].x + darwinMainScreenX; sy = dixScreenOrigins[pWin->drawable.pScreen->myNum].y + darwinMainScreenY; @@ -1499,7 +1501,7 @@ RootlessFlushWindowColormap (WindowPtr pWin) wc.colormap = RootlessColormapCallback; wc.colormap_data = pWin->drawable.pScreen; - configure_window ((xp_window_id)winRec->wid, XP_COLORMAP, &wc); + configure_window (MAKE_WINDOW_ID(winRec->wid), XP_COLORMAP, &wc); } /* @@ -1645,7 +1647,7 @@ RootlessHideAllWindows (void) { wc.stack_mode = XP_UNMAPPED; wc.sibling = 0; - configure_window ((xp_window_id)winRec->wid, XP_STACKING, &wc); + configure_window (MAKE_WINDOW_ID(winRec->wid), XP_STACKING, &wc); } } } |