aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/Xi/grabdev.c5
-rw-r--r--xorg-server/Xi/xiallowev.c2
-rw-r--r--xorg-server/dix/events.c25
-rw-r--r--xorg-server/include/inputstr.h2
-rw-r--r--xorg-server/test/signal-logging.c3
-rw-r--r--xorg-server/xkeyboard-config/symbols/ara23
-rw-r--r--xorg-server/xkeyboard-config/symbols/us4
7 files changed, 49 insertions, 15 deletions
diff --git a/xorg-server/Xi/grabdev.c b/xorg-server/Xi/grabdev.c
index 443ef56c1..9c6c429ed 100644
--- a/xorg-server/Xi/grabdev.c
+++ b/xorg-server/Xi/grabdev.c
@@ -175,10 +175,7 @@ CreateMaskFromList(ClientPtr client, XEventClass * list, int count,
int device;
DeviceIntPtr tdev;
- for (i = 0; i < EMASKSIZE; i++) {
- mask[i].mask = 0;
- mask[i].dev = NULL;
- }
+ memset(mask, 0, EMASKSIZE * sizeof(struct tmask));
for (i = 0; i < count; i++, list++) {
device = *list >> 8;
diff --git a/xorg-server/Xi/xiallowev.c b/xorg-server/Xi/xiallowev.c
index 62a0727b0..ebef23344 100644
--- a/xorg-server/Xi/xiallowev.c
+++ b/xorg-server/Xi/xiallowev.c
@@ -81,7 +81,7 @@ ProcXIAllowEvents(ClientPtr client)
have_xi22 = TRUE;
}
else {
- REQUEST_SIZE_MATCH(xXIAllowEventsReq);
+ REQUEST_AT_LEAST_SIZE(xXIAllowEventsReq);
}
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index ed3138d07..086601a69 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -2105,6 +2105,7 @@ DeliverEventToInputClients(DeviceIntPtr dev, InputClients * inputclients,
{
int attempt;
enum EventDeliveryState rc = EVENT_NOT_DELIVERED;
+ Bool have_device_button_grab_class_client = FALSE;
for (; inputclients; inputclients = inputclients->next) {
Mask mask;
@@ -2124,13 +2125,21 @@ DeliverEventToInputClients(DeviceIntPtr dev, InputClients * inputclients,
events, count,
mask, filter, grab))) {
if (attempt > 0) {
- rc = EVENT_DELIVERED;
- *client_return = client;
- *mask_return = mask;
- /* Success overrides non-success, so if we've been
- * successful on one client, return that */
- }
- else if (rc == EVENT_NOT_DELIVERED)
+ /*
+ * The order of clients is arbitrary therefore if one
+ * client belongs to DeviceButtonGrabClass make sure to
+ * catch it.
+ */
+ if (!have_device_button_grab_class_client) {
+ rc = EVENT_DELIVERED;
+ *client_return = client;
+ *mask_return = mask;
+ /* Success overrides non-success, so if we've been
+ * successful on one client, return that */
+ if (mask & DeviceButtonGrabMask)
+ have_device_button_grab_class_client = TRUE;
+ }
+ } else if (rc == EVENT_NOT_DELIVERED)
rc = EVENT_REJECTED;
}
}
@@ -4644,7 +4653,7 @@ DeviceEnterLeaveEvent(DeviceIntPtr mouse,
filter = GetEventFilter(mouse, (xEvent *) event);
- if (grab) {
+ if (grab && grab->type == XI2) {
Mask mask;
mask = xi2mask_isset(grab->xi2mask, mouse, type);
diff --git a/xorg-server/include/inputstr.h b/xorg-server/include/inputstr.h
index 2da72c1ec..dc36c5d8d 100644
--- a/xorg-server/include/inputstr.h
+++ b/xorg-server/include/inputstr.h
@@ -65,7 +65,7 @@ extern _X_EXPORT int CountBits(const uint8_t * mask, int len);
#define SameClient(obj,client) \
(CLIENT_BITS((obj)->resource) == (client)->clientAsMask)
-#define EMASKSIZE MAXDEVICES + 2
+#define EMASKSIZE (MAXDEVICES + 2)
/* This is the last XI2 event supported by the server. If you add
* events to the protocol, the server will not support these events until
diff --git a/xorg-server/test/signal-logging.c b/xorg-server/test/signal-logging.c
index f6bc85ce8..a03c5acbe 100644
--- a/xorg-server/test/signal-logging.c
+++ b/xorg-server/test/signal-logging.c
@@ -150,6 +150,7 @@ number_formatting(void)
assert(check_float_format_test(float_tests[i]));
}
+#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-security"
static void logging_format(void)
{
@@ -378,7 +379,7 @@ static void logging_format(void)
#undef read_log_msg
}
-#pragma GCC diagnostic pop "-Wformat-security"
+#pragma GCC diagnostic pop /* "-Wformat-security" */
int
main(int argc, char **argv)
diff --git a/xorg-server/xkeyboard-config/symbols/ara b/xorg-server/xkeyboard-config/symbols/ara
index c0d57ef42..1944b25ce 100644
--- a/xorg-server/xkeyboard-config/symbols/ara
+++ b/xorg-server/xkeyboard-config/symbols/ara
@@ -100,6 +100,27 @@ xkb_symbols "azerty" {
};
partial alphanumeric_keys
+xkb_symbols "digits_KP" {
+ name[Group1]= "Arabic (digits_KP)";
+
+ // use arabic script digits on KP
+
+ key <KP7> { [ KP_Home, 0x1000667 ] }; //
+ key <KP8> { [ KP_Up, 0x1000668 ] }; //
+ key <KP9> { [ KP_Prior, 0x1000669 ] }; //
+
+ key <KP4> { [ KP_Left, 0x1000664 ] }; //
+ key <KP5> { [ KP_Begin, 0x1000665 ] }; //
+ key <KP6> { [ KP_Right, 0x1000666 ] }; //
+
+ key <KP1> { [ KP_End, 0x1000661 ] }; //
+ key <KP2> { [ KP_Down, 0x1000662 ] }; //
+ key <KP3> { [ KP_Next, 0x1000663 ] }; //
+
+ key <KP0> { [ KP_Insert, 0x1000660 ] }; //
+};
+
+partial alphanumeric_keys
xkb_symbols "digits" {
include "ara(basic)"
name[Group1]= "Arabic (digits)";
@@ -116,6 +137,8 @@ xkb_symbols "digits" {
key <AE08> { [ 0x1000668, asterisk ] };
key <AE09> { [ 0x1000669, parenright ] };
key <AE10> { [ 0x1000660, parenleft ] };
+
+ include "ara(digits_KP)"
};
partial alphanumeric_keys
diff --git a/xorg-server/xkeyboard-config/symbols/us b/xorg-server/xkeyboard-config/symbols/us
index 31977e417..73673882d 100644
--- a/xorg-server/xkeyboard-config/symbols/us
+++ b/xorg-server/xkeyboard-config/symbols/us
@@ -129,6 +129,8 @@ xkb_symbols "intl" {
key <AB10> { [ slash, question, questiondown, dead_hook ] };
key <BKSL> { [ backslash, bar, notsign, brokenbar ] };
+ key <LSGT> { [ backslash, bar, backslash, bar ] };
+
include "level3(ralt_switch)"
};
@@ -183,6 +185,8 @@ xkb_symbols "alt-intl" {
key <AB09> { [ period, greater, dead_abovedot, dead_circumflex ] };
key <AB10> { [ slash, question, dead_hook, dead_hook ] };
+ key <LSGT> { [ backslash, bar, backslash, bar ] };
+
include "level3(ralt_switch)"
};