dix: NewCurrentScreen must work on pointers where possible
When a screen switch is triggered by PointerKeys, the device for NewCurrentScreen is the keyboard. Submitting pointer events for this keyboard (without valuators) has no effect as GPE ignores the event. Force the dequeuing through the XTest device attached to this device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
parent
535b3789be
commit
d0a7cd759d
14
dix/events.c
14
dix/events.c
|
@ -3360,7 +3360,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 +3376,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 +3394,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
|
||||
|
|
Loading…
Reference in New Issue