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;
|
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;
|
int x, y, off_x, off_y, i;
|
||||||
|
|
||||||
if(!XineramaSetWindowPntrs(pDev, pWin))
|
if(!XineramaSetWindowPntrs(pDev, pWin))
|
||||||
|
@ -594,7 +587,6 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev,
|
||||||
|
|
||||||
XineramaCheckPhysLimits(pDev, pSprite->current,
|
XineramaCheckPhysLimits(pDev, pSprite->current,
|
||||||
generateEvents);
|
generateEvents);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -835,13 +827,6 @@ ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bo
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
SpritePtr pSprite = pDev->spriteInfo->sprite;
|
SpritePtr pSprite = pDev->spriteInfo->sprite;
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
|
||||||
if(!noPanoramiXExtension) {
|
|
||||||
XineramaConfineCursorToWindow(pDev, pWin, generateEvents);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (syncEvents.playingEvents)
|
if (syncEvents.playingEvents)
|
||||||
{
|
{
|
||||||
CheckVirtualMotion(pDev, (QdEventPtr)NULL, pWin);
|
CheckVirtualMotion(pDev, (QdEventPtr)NULL, pWin);
|
||||||
|
@ -849,6 +834,12 @@ ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bo
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef PANORAMIX
|
||||||
|
if(!noPanoramiXExtension) {
|
||||||
|
XineramaConfineCursorToWindow(pDev, pWin, generateEvents);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
pSprite->hotLimits = *REGION_EXTENTS( pScreen, &pWin->borderSize);
|
pSprite->hotLimits = *REGION_EXTENTS( pScreen, &pWin->borderSize);
|
||||||
pSprite->hotShape = wBoundingShape(pWin) ? &pWin->borderSize
|
pSprite->hotShape = wBoundingShape(pWin) ? &pWin->borderSize
|
||||||
: NullRegion;
|
: NullRegion;
|
||||||
|
|
Loading…
Reference in New Issue