diff options
author | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-10-31 18:58:25 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-10-31 19:03:32 -0700 |
commit | 20239a4deebccc9f86586ef6b8ef61311a6fa6a0 (patch) | |
tree | 2b2d8f8cfb38eb1778469b1db6380b992fb3743d /miext | |
parent | ecd55bc859eb5d7c639d5a6d531d9df524124247 (diff) |
Rootless: LP64 related casting fixes from Bob Murphy
(cherry picked from commit 40441c4e31167932721a79d7ca572caaa1d36e72)
Diffstat (limited to 'miext')
-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); } } } |