aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/events.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-19 12:11:26 +0200
committermarha <marha@users.sourceforge.net>2011-10-19 12:11:26 +0200
commit1e90ede4237374dfbb2c8c506a906233bcfd3c5d (patch)
tree13b59b0ab2715fd0bb9eea788c73b08f3b07c01e /xorg-server/dix/events.c
parentbaf98f9bb36f956245d83ecd04f90625d6d68d2b (diff)
parent9f986778bd4393c5a9108426969d45aa7f10f334 (diff)
downloadvcxsrv-1e90ede4237374dfbb2c8c506a906233bcfd3c5d.tar.gz
vcxsrv-1e90ede4237374dfbb2c8c506a906233bcfd3c5d.tar.bz2
vcxsrv-1e90ede4237374dfbb2c8c506a906233bcfd3c5d.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/include/os.h
Diffstat (limited to 'xorg-server/dix/events.c')
-rw-r--r--xorg-server/dix/events.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index c5f435c11..587724e16 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;
@@ -3366,7 +3359,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;
@@ -3378,15 +3375,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,
@@ -3396,7 +3393,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