xinput: Remove ExtExclusiveMasks

Initialized to a constant value, never modified, never varied by device.

Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson 2018-04-19 14:42:47 -04:00 committed by Adam Jackson
parent 1e29f3ea3e
commit 4520ec9bd5
2 changed files with 1 additions and 23 deletions

View File

@ -153,7 +153,6 @@ const Mask DevicePropertyNotifyMask = (1L << 19);
const Mask XIAllMasks = (1L << 20) - 1; const Mask XIAllMasks = (1L << 20) - 1;
int ExtEventIndex; int ExtEventIndex;
Mask ExtExclusiveMasks[EMASKSIZE];
static struct dev_type { static struct dev_type {
Atom type; Atom type;
@ -951,23 +950,6 @@ SetEventInfo(Mask mask, int constant)
EventInfo[ExtEventIndex++].type = constant; EventInfo[ExtEventIndex++].type = constant;
} }
/**************************************************************************
*
* Allow the specified event to be restricted to being selected by one
* client at a time.
* The default is to allow more than one client to select the event.
*
*/
static void
SetExclusiveAccess(Mask mask)
{
int i;
for (i = 0; i < MAXDEVICES; i++)
ExtExclusiveMasks[i] |= mask;
}
/************************************************************************** /**************************************************************************
* *
* Assign the specified mask to the specified event. * Assign the specified mask to the specified event.
@ -1069,8 +1051,6 @@ FixExtensionEvents(ExtensionEntry * extEntry)
SetMaskForExtEvent(ChangeDeviceNotifyMask, ChangeDeviceNotify); SetMaskForExtEvent(ChangeDeviceNotifyMask, ChangeDeviceNotify);
SetEventInfo(DeviceButtonGrabMask, _deviceButtonGrab); SetEventInfo(DeviceButtonGrabMask, _deviceButtonGrab);
SetExclusiveAccess(DeviceButtonGrabMask);
SetEventInfo(DeviceOwnerGrabButtonMask, _deviceOwnerGrabButton); SetEventInfo(DeviceOwnerGrabButtonMask, _deviceOwnerGrabButton);
SetEventInfo(DevicePresenceNotifyMask, _devicePresence); SetEventInfo(DevicePresenceNotifyMask, _devicePresence);
SetMaskForExtEvent(DevicePropertyNotifyMask, DevicePropertyNotify); SetMaskForExtEvent(DevicePropertyNotifyMask, DevicePropertyNotify);

View File

@ -65,8 +65,6 @@ SOFTWARE.
#include "grabdev.h" #include "grabdev.h"
#include "selectev.h" #include "selectev.h"
extern Mask ExtExclusiveMasks[];
static int static int
HandleDevicePresenceMask(ClientPtr client, WindowPtr win, HandleDevicePresenceMask(ClientPtr client, WindowPtr win,
XEventClass * cls, CARD16 *count) XEventClass * cls, CARD16 *count)
@ -175,7 +173,7 @@ ProcXSelectExtensionEvent(ClientPtr client)
} }
if ((ret = if ((ret =
SelectForWindow((DeviceIntPtr) tmp[i].dev, pWin, client, SelectForWindow((DeviceIntPtr) tmp[i].dev, pWin, client,
tmp[i].mask, ExtExclusiveMasks[i])) != Success) tmp[i].mask, DeviceButtonGrabMask)) != Success)
return ret; return ret;
} }