dix: Incroduce CursorConfinedTo vfunc in Screen
This function will be called when a pointer is grabbed non-root window set as the 'confineTo'. This will enable the ddx to handle the confinement their own way. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
daf48a3aba
commit
5998da7855
|
@ -882,6 +882,8 @@ ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents,
|
||||||
SyntheticMotion(pDev, pSprite->hot.x, pSprite->hot.y);
|
SyntheticMotion(pDev, pSprite->hot.x, pSprite->hot.y);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
if (!noPanoramiXExtension) {
|
if (!noPanoramiXExtension) {
|
||||||
XineramaConfineCursorToWindow(pDev, pWin, generateEvents);
|
XineramaConfineCursorToWindow(pDev, pWin, generateEvents);
|
||||||
|
@ -893,6 +895,9 @@ ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents,
|
||||||
: NullRegion;
|
: NullRegion;
|
||||||
CheckPhysLimits(pDev, pSprite->current, generateEvents,
|
CheckPhysLimits(pDev, pSprite->current, generateEvents,
|
||||||
confineToScreen, pWin->drawable.pScreen);
|
confineToScreen, pWin->drawable.pScreen);
|
||||||
|
|
||||||
|
if (*pScreen->CursorConfinedTo)
|
||||||
|
(*pScreen->CursorConfinedTo) (pDev, pScreen, pWin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -241,6 +241,10 @@ typedef void (*CursorWarpedToProcPtr) (DeviceIntPtr /* pDev */ ,
|
||||||
int /*x */ ,
|
int /*x */ ,
|
||||||
int /*y */ );
|
int /*y */ );
|
||||||
|
|
||||||
|
typedef void (*CurserConfinedToProcPtr) (DeviceIntPtr /* pDev */ ,
|
||||||
|
ScreenPtr /*pScreen */ ,
|
||||||
|
WindowPtr /*pWindow */ );
|
||||||
|
|
||||||
typedef Bool (*CreateGCProcPtr) (GCPtr /*pGC */ );
|
typedef Bool (*CreateGCProcPtr) (GCPtr /*pGC */ );
|
||||||
|
|
||||||
typedef Bool (*CreateColormapProcPtr) (ColormapPtr /*pColormap */ );
|
typedef Bool (*CreateColormapProcPtr) (ColormapPtr /*pColormap */ );
|
||||||
|
@ -563,6 +567,7 @@ typedef struct _Screen {
|
||||||
RecolorCursorProcPtr RecolorCursor;
|
RecolorCursorProcPtr RecolorCursor;
|
||||||
SetCursorPositionProcPtr SetCursorPosition;
|
SetCursorPositionProcPtr SetCursorPosition;
|
||||||
CursorWarpedToProcPtr CursorWarpedTo;
|
CursorWarpedToProcPtr CursorWarpedTo;
|
||||||
|
CurserConfinedToProcPtr CursorConfinedTo;
|
||||||
|
|
||||||
/* GC procedures */
|
/* GC procedures */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue