diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-01-23 15:43:48 +1030 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-01-25 10:26:41 +1030 |
commit | 94a6a65ae7414c8247aa1741ec5c7561e6f4bbe0 (patch) | |
tree | 4e5e3c6c731861efb1bda9ee0e5c38e3b9bc0745 /Xext/geext.c | |
parent | ba315ae5ddd00763147a4b0cdcacba7691793dfc (diff) |
Xext: allow per-device GE masks.
Instead of a single mask per client we allow the storage of a mask per client
per device.
Diffstat (limited to 'Xext/geext.c')
-rw-r--r-- | Xext/geext.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Xext/geext.c b/Xext/geext.c index 8f48e4493..0127a05f1 100644 --- a/Xext/geext.c +++ b/Xext/geext.c @@ -300,7 +300,8 @@ GERecalculateWinMask(WindowPtr pWin) } /* Set generic event mask for given window. */ -void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask) +void GEWindowSetMask(ClientPtr pClient, DeviceIntPtr pDev, + WindowPtr pWin, int extension, Mask mask) { GenericMaskPtr cli; @@ -326,13 +327,13 @@ void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask cli = evmasks->geClients; while(cli) { - if (cli->client == pClient) + if (cli->client == pClient && cli->dev == pDev) break; cli = cli->next; } if (!cli) { - /* new client */ + /* new client and/or new device */ cli = (GenericMaskPtr)xcalloc(1, sizeof(GenericMaskRec)); if (!cli) { @@ -341,6 +342,7 @@ void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask } cli->next = evmasks->geClients; cli->client = pClient; + cli->dev = pDev; evmasks->geClients = cli; } cli->eventMask[extension] = mask; @@ -348,7 +350,7 @@ void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask { /* remove client. */ cli = pWin->optional->geMasks->geClients; - if (cli->client == pClient) + if (cli->client == pClient && cli->dev == pDev) { pWin->optional->geMasks->geClients = cli->next; xfree(cli); @@ -359,7 +361,7 @@ void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask while(cli) { - if (cli->client == pClient) + if (cli->client == pClient && cli->dev == pDev) { prev->next = cli->next; xfree(cli); |