Rootless: LP64 related casting fixes from Bob Murphy

This commit is contained in:
Jeremy Huddleston 2008-10-31 18:58:25 -07:00
parent 0afd2ca49b
commit 40441c4e31
2 changed files with 6 additions and 4 deletions

View File

@ -239,7 +239,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; \

View File

@ -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;
@ -1503,7 +1505,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);
}
/*
@ -1736,7 +1738,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);
}
}
}