dix: reduce redunancy in XineramaConfineCursorToWindow.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
cdce5699f0
commit
bf044f6d10
21
dix/events.c
21
dix/events.c
|
@ -549,13 +549,6 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev,
|
|||
{
|
||||
SpritePtr pSprite = pDev->spriteInfo->sprite;
|
||||
|
||||
if (syncEvents.playingEvents)
|
||||
{
|
||||
CheckVirtualMotion(pDev, (QdEventPtr)NULL, pWin);
|
||||
SyntheticMotion(pDev, pSprite->hot.x, pSprite->hot.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
int x, y, off_x, off_y, i;
|
||||
|
||||
if(!XineramaSetWindowPntrs(pDev, pWin))
|
||||
|
@ -595,7 +588,6 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev,
|
|||
XineramaCheckPhysLimits(pDev, pSprite->current,
|
||||
generateEvents);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
|
@ -835,13 +827,6 @@ ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bo
|
|||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
SpritePtr pSprite = pDev->spriteInfo->sprite;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension) {
|
||||
XineramaConfineCursorToWindow(pDev, pWin, generateEvents);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (syncEvents.playingEvents)
|
||||
{
|
||||
CheckVirtualMotion(pDev, (QdEventPtr)NULL, pWin);
|
||||
|
@ -849,6 +834,12 @@ ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bo
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension) {
|
||||
XineramaConfineCursorToWindow(pDev, pWin, generateEvents);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
pSprite->hotLimits = *REGION_EXTENTS( pScreen, &pWin->borderSize);
|
||||
pSprite->hotShape = wBoundingShape(pWin) ? &pWin->borderSize
|
||||
: NullRegion;
|
||||
|
|
Loading…
Reference in New Issue