summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xext/xselinux_ext.c6
-rw-r--r--Xi/exevents.c2
-rw-r--r--Xi/xichangehierarchy.c13
-rw-r--r--Xi/xipassivegrab.c10
4 files changed, 22 insertions, 9 deletions
diff --git a/Xext/xselinux_ext.c b/Xext/xselinux_ext.c
index 374571c4b..85ca2dc8e 100644
--- a/Xext/xselinux_ext.c
+++ b/Xext/xselinux_ext.c
@@ -528,12 +528,6 @@ ProcSELinuxDispatch(ClientPtr client)
static int
SProcSELinuxQueryVersion(ClientPtr client)
{
- REQUEST(SELinuxQueryVersionReq);
- int n;
-
- REQUEST_SIZE_MATCH(SELinuxQueryVersionReq);
- swaps(&stuff->client_major, n);
- swaps(&stuff->client_minor, n);
return ProcSELinuxQueryVersion(client);
}
diff --git a/Xi/exevents.c b/Xi/exevents.c
index dcb496fd4..9d43564f8 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -927,7 +927,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++)
if (BitIsOn(mouse->button->down, i))
- SetBit(event->buttons, i);
+ SetBit(event->buttons, mouse->button->map[i]);
if (kbd && kbd->key)
{
diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c
index dfcd52fd0..4a15d5c63 100644
--- a/Xi/xichangehierarchy.c
+++ b/Xi/xichangehierarchy.c
@@ -202,6 +202,19 @@ unwind:
return rc;
}
+static void
+disable_clientpointer(DeviceIntPtr dev)
+{
+ int i;
+
+ for (i = 0; i < currentMaxClients; i++)
+ {
+ ClientPtr client = clients[i];
+ if (client && client->clientPtr == dev)
+ client->clientPtr = NULL;
+ }
+}
+
static int
disable_clientpointer(DeviceIntPtr dev)
{
diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
index 5cdd8aca6..af46282c8 100644
--- a/Xi/xipassivegrab.c
+++ b/Xi/xipassivegrab.c
@@ -140,11 +140,17 @@ ProcXIPassiveGrabDevice(ClientPtr client)
memset(&param, 0, sizeof(param));
param.grabtype = GRABTYPE_XI2;
param.ownerEvents = stuff->owner_events;
- param.this_device_mode = stuff->grab_mode;
- param.other_devices_mode = stuff->paired_device_mode;
param.grabWindow = stuff->grab_window;
param.cursor = stuff->cursor;
+ if (IsKeyboardDevice(dev)) {
+ param.this_device_mode = stuff->grab_mode;
+ param.other_devices_mode = stuff->paired_device_mode;
+ } else {
+ param.this_device_mode = stuff->paired_device_mode;
+ param.other_devices_mode = stuff->grab_mode;
+ }
+
if (stuff->cursor != None)
{
status = dixLookupResourceByType(&tmp, stuff->cursor,