parent
28b93d74a1
commit
09c0c1a3cc
36
dix/events.c
36
dix/events.c
|
@ -371,9 +371,7 @@ extern int lastEvent;
|
||||||
|
|
||||||
static Mask lastEventMask;
|
static Mask lastEventMask;
|
||||||
|
|
||||||
#ifdef XINPUT
|
|
||||||
extern int DeviceMotionNotify;
|
extern int DeviceMotionNotify;
|
||||||
#endif
|
|
||||||
|
|
||||||
#define CantBeFiltered NoEventMask
|
#define CantBeFiltered NoEventMask
|
||||||
static Mask filters[128] =
|
static Mask filters[128] =
|
||||||
|
@ -2049,7 +2047,6 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask,
|
||||||
pEvents->u.u.detail = NotifyNormal;
|
pEvents->u.u.detail = NotifyNormal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef XINPUT
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((type == DeviceMotionNotify) &&
|
if ((type == DeviceMotionNotify) &&
|
||||||
|
@ -2057,7 +2054,6 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask,
|
||||||
((deviceKeyButtonPointer*)pEvents, mask) != 0)
|
((deviceKeyButtonPointer*)pEvents, mask) != 0)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
type &= 0177;
|
type &= 0177;
|
||||||
if (type != KeymapNotify)
|
if (type != KeymapNotify)
|
||||||
{
|
{
|
||||||
|
@ -2271,7 +2267,6 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent
|
||||||
}
|
}
|
||||||
else if ((type == MotionNotify) && deliveries)
|
else if ((type == MotionNotify) && deliveries)
|
||||||
pDev->valuator->motionHintWindow = pWin;
|
pDev->valuator->motionHintWindow = pWin;
|
||||||
#ifdef XINPUT
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (((type == DeviceMotionNotify)
|
if (((type == DeviceMotionNotify)
|
||||||
|
@ -2283,7 +2278,6 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent
|
||||||
(deviceKeyButtonPointer*) pEvents,
|
(deviceKeyButtonPointer*) pEvents,
|
||||||
grab, client, deliveryMask);
|
grab, client, deliveryMask);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (deliveries)
|
if (deliveries)
|
||||||
return deliveries;
|
return deliveries;
|
||||||
return nondeliveries;
|
return nondeliveries;
|
||||||
|
@ -3395,11 +3389,7 @@ CheckPassiveGrabsOnWindow(
|
||||||
#endif
|
#endif
|
||||||
tempGrab.modifierDevice = grab->modifierDevice;
|
tempGrab.modifierDevice = grab->modifierDevice;
|
||||||
if ((device == grab->modifierDevice) &&
|
if ((device == grab->modifierDevice) &&
|
||||||
((xE->u.u.type == KeyPress)
|
((xE->u.u.type == KeyPress) || (xE->u.u.type == DeviceKeyPress)))
|
||||||
#if defined(XINPUT) && defined(XKB)
|
|
||||||
|| (xE->u.u.type == DeviceKeyPress)
|
|
||||||
#endif
|
|
||||||
))
|
|
||||||
tempGrab.modifiersDetail.exact =
|
tempGrab.modifiersDetail.exact =
|
||||||
#ifdef XKB
|
#ifdef XKB
|
||||||
(noXkbExtension) ?
|
(noXkbExtension) ?
|
||||||
|
@ -3537,11 +3527,8 @@ CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE,
|
||||||
WindowPtr pWin = NULL;
|
WindowPtr pWin = NULL;
|
||||||
FocusClassPtr focus = device->focus;
|
FocusClassPtr focus = device->focus;
|
||||||
|
|
||||||
if (((xE->u.u.type == ButtonPress)
|
if (((xE->u.u.type == ButtonPress) || (xE->u.u.type == DeviceButtonPress))
|
||||||
#if defined(XINPUT) && defined(XKB)
|
&& (device->button->buttonsDown != 1))
|
||||||
|| (xE->u.u.type == DeviceButtonPress)
|
|
||||||
#endif
|
|
||||||
) && (device->button->buttonsDown != 1))
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
i = checkFirst;
|
i = checkFirst;
|
||||||
|
@ -3694,18 +3681,13 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (deliveries && (xE->u.u.type == MotionNotify
|
if (deliveries && (xE->u.u.type == MotionNotify
|
||||||
#ifdef XINPUT
|
|| xE->u.u.type == DeviceMotionNotify))
|
||||||
|| xE->u.u.type == DeviceMotionNotify
|
|
||||||
#endif
|
|
||||||
))
|
|
||||||
thisDev->valuator->motionHintWindow = grab->window;
|
thisDev->valuator->motionHintWindow = grab->window;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (deliveries && !deactivateGrab && (xE->u.u.type != MotionNotify
|
if (deliveries && !deactivateGrab &&
|
||||||
#ifdef XINPUT
|
(xE->u.u.type != MotionNotify && xE->u.u.type != DeviceMotionNotify))
|
||||||
&& xE->u.u.type != DeviceMotionNotify
|
{
|
||||||
#endif
|
|
||||||
))
|
|
||||||
switch (grabinfo->sync.state)
|
switch (grabinfo->sync.state)
|
||||||
{
|
{
|
||||||
case FREEZE_BOTH_NEXT_EVENT:
|
case FREEZE_BOTH_NEXT_EVENT:
|
||||||
|
@ -3737,6 +3719,7 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev,
|
||||||
*dxE = *xE;
|
*dxE = *xE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6022,9 +6005,8 @@ DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources)
|
||||||
while ( (passive = wPassiveGrabs(pWin)) )
|
while ( (passive = wPassiveGrabs(pWin)) )
|
||||||
FreeResource(passive->resource, RT_NONE);
|
FreeResource(passive->resource, RT_NONE);
|
||||||
}
|
}
|
||||||
#ifdef XINPUT
|
|
||||||
DeleteWindowFromAnyExtEvents(pWin, freeResources);
|
DeleteWindowFromAnyExtEvents(pWin, freeResources);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -452,7 +452,6 @@ CreateRootWindow(ScreenPtr pScreen)
|
||||||
pWin->optional->clipShape = NULL;
|
pWin->optional->clipShape = NULL;
|
||||||
pWin->optional->inputShape = NULL;
|
pWin->optional->inputShape = NULL;
|
||||||
#endif
|
#endif
|
||||||
#ifdef XINPUT
|
|
||||||
pWin->optional->inputMasks = NULL;
|
pWin->optional->inputMasks = NULL;
|
||||||
pWin->optional->deviceCursors = NULL;
|
pWin->optional->deviceCursors = NULL;
|
||||||
pWin->optional->geMasks = (GenericClientMasksPtr)xcalloc(1, sizeof(GenericClientMasksRec));
|
pWin->optional->geMasks = (GenericClientMasksPtr)xcalloc(1, sizeof(GenericClientMasksRec));
|
||||||
|
@ -461,7 +460,6 @@ CreateRootWindow(ScreenPtr pScreen)
|
||||||
xfree(pWin->optional);
|
xfree(pWin->optional);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
pWin->optional->access.perm = NULL;
|
pWin->optional->access.perm = NULL;
|
||||||
pWin->optional->access.deny = NULL;
|
pWin->optional->access.deny = NULL;
|
||||||
|
@ -3690,10 +3688,8 @@ CheckWindowOptionalNeed (WindowPtr w)
|
||||||
if (optional->inputShape != NULL)
|
if (optional->inputShape != NULL)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
#ifdef XINPUT
|
|
||||||
if (optional->inputMasks != NULL)
|
if (optional->inputMasks != NULL)
|
||||||
return;
|
return;
|
||||||
#endif
|
|
||||||
if (optional->deviceCursors != NULL)
|
if (optional->deviceCursors != NULL)
|
||||||
{
|
{
|
||||||
DevCursNodePtr pNode = optional->deviceCursors;
|
DevCursNodePtr pNode = optional->deviceCursors;
|
||||||
|
@ -3753,9 +3749,7 @@ MakeWindowOptional (WindowPtr pWin)
|
||||||
optional->clipShape = NULL;
|
optional->clipShape = NULL;
|
||||||
optional->inputShape = NULL;
|
optional->inputShape = NULL;
|
||||||
#endif
|
#endif
|
||||||
#ifdef XINPUT
|
|
||||||
optional->inputMasks = NULL;
|
optional->inputMasks = NULL;
|
||||||
#endif
|
|
||||||
optional->deviceCursors = NULL;
|
optional->deviceCursors = NULL;
|
||||||
|
|
||||||
optional->geMasks =
|
optional->geMasks =
|
||||||
|
|
Loading…
Reference in New Issue