diff options
author | marha <marha@users.sourceforge.net> | 2011-10-19 10:44:43 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-10-19 10:44:43 +0200 |
commit | 9f986778bd4393c5a9108426969d45aa7f10f334 (patch) | |
tree | 27d7bd08dac54a54a923e76dccf2b8e388be2a03 /xorg-server/dix/events.c | |
parent | afbd3947071a33f59dda122f1ac396442a02c128 (diff) | |
download | vcxsrv-9f986778bd4393c5a9108426969d45aa7f10f334.tar.gz vcxsrv-9f986778bd4393c5a9108426969d45aa7f10f334.tar.bz2 vcxsrv-9f986778bd4393c5a9108426969d45aa7f10f334.zip |
libX11 libXext libXft mesa libxcb mkfontscale pixman xserver
xkeyboard-config git update 19 oct 2011
Diffstat (limited to 'xorg-server/dix/events.c')
-rw-r--r-- | xorg-server/dix/events.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index 4e21c2df2..f87d2bbf9 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -525,13 +525,6 @@ SyntheticMotion(DeviceIntPtr dev, int x, int y) { static void PostNewCursor(DeviceIntPtr pDev); static Bool -pointOnScreen(ScreenPtr pScreen, int x, int y) -{ - return x >= pScreen->x && x < pScreen->x + pScreen->width && - y >= pScreen->y && y < pScreen->y + pScreen->height; -} - -static Bool XineramaSetCursorPosition( DeviceIntPtr pDev, int x, @@ -550,13 +543,13 @@ XineramaSetCursorPosition( x += screenInfo.screens[0]->x; y += screenInfo.screens[0]->y; - if(!pointOnScreen(pScreen, x, y)) + if(!point_on_screen(pScreen, x, y)) { FOR_NSCREENS(i) { if(i == pScreen->myNum) continue; - if(pointOnScreen(screenInfo.screens[i], x, y)) + if(point_on_screen(screenInfo.screens[i], x, y)) { pScreen = screenInfo.screens[i]; break; @@ -3360,7 +3353,11 @@ WindowHasNewCursor(WindowPtr pWin) void NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) { - SpritePtr pSprite = pDev->spriteInfo->sprite; + DeviceIntPtr ptr; + SpritePtr pSprite; + + ptr = IsFloating(pDev) ? pDev : GetXTestDevice(GetMaster(pDev, MASTER_POINTER)); + pSprite = ptr->spriteInfo->sprite; pSprite->hotPhys.x = x; pSprite->hotPhys.y = y; @@ -3372,15 +3369,15 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) pSprite->screen = newScreen; /* Make sure we tell the DDX to update its copy of the screen */ if(pSprite->confineWin) - XineramaConfineCursorToWindow(pDev, + XineramaConfineCursorToWindow(ptr, pSprite->confineWin, TRUE); else - XineramaConfineCursorToWindow(pDev, screenInfo.screens[0]->root, TRUE); + XineramaConfineCursorToWindow(ptr, screenInfo.screens[0]->root, TRUE); /* if the pointer wasn't confined, the DDX won't get told of the pointer warp so we reposition it here */ if(!syncEvents.playingEvents) (*pSprite->screen->SetCursorPosition)( - pDev, + ptr, pSprite->screen, pSprite->hotPhys.x + screenInfo.screens[0]->x - pSprite->screen->x, @@ -3390,7 +3387,7 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) } else #endif if (newScreen != pSprite->hotPhys.pScreen) - ConfineCursorToWindow(pDev, newScreen->root, TRUE, FALSE); + ConfineCursorToWindow(ptr, newScreen->root, TRUE, FALSE); } #ifdef PANORAMIX |