summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-07-20 16:39:16 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-07-22 12:12:51 +1000
commit9a1bfa5664a80f03cedeb89b9f8a86115a08e7af (patch)
treea20141d9de6d3f8795e0a2d7a0e642c76480ceee
parentafc3e3b5955ea4a49308399820cc4c499f4312da (diff)
input: remove XI2 keysym grabs, use keycode grabs instead.
Keysym grabs are tricky in the details, keycode grabs are known to work. So for now, provide keycode grabs only. Requires inputproto 1.9.99.15. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--Xi/xipassivegrab.c8
-rw-r--r--configure.ac2
-rw-r--r--dix/events.c3
-rw-r--r--dix/grabs.c2
-rw-r--r--test/input.c4
5 files changed, 8 insertions, 11 deletions
diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
index df0f5bedd..1d6200f3a 100644
--- a/Xi/xipassivegrab.c
+++ b/Xi/xipassivegrab.c
@@ -102,7 +102,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
}
if (stuff->grab_type != XIGrabtypeButton &&
- stuff->grab_type != XIGrabtypeKeysym &&
+ stuff->grab_type != XIGrabtypeKeycode &&
stuff->grab_type != XIGrabtypeEnter &&
stuff->grab_type != XIGrabtypeFocusIn)
{
@@ -180,7 +180,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
status = GrabButton(client, dev, mod_dev, stuff->detail,
&param, GRABTYPE_XI2, &mask);
break;
- case XIGrabtypeKeysym:
+ case XIGrabtypeKeycode:
status = GrabKey(client, dev, mod_dev, stuff->detail,
&param, GRABTYPE_XI2, &mask);
break;
@@ -265,7 +265,7 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
return rc;
if (stuff->grab_type != XIGrabtypeButton &&
- stuff->grab_type != XIGrabtypeKeysym &&
+ stuff->grab_type != XIGrabtypeKeycode &&
stuff->grab_type != XIGrabtypeEnter &&
stuff->grab_type != XIGrabtypeFocusIn)
{
@@ -295,7 +295,7 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
switch(stuff->grab_type)
{
case XIGrabtypeButton: tempGrab.type = XI_ButtonPress; break;
- case XIGrabtypeKeysym: tempGrab.type = XI_KeyPress; break;
+ case XIGrabtypeKeycode: tempGrab.type = XI_KeyPress; break;
case XIGrabtypeEnter: tempGrab.type = XI_Enter; break;
case XIGrabtypeFocusIn: tempGrab.type = XI_FocusIn; break;
}
diff --git a/configure.ac b/configure.ac
index 84613cc9e..905239801 100644
--- a/configure.ac
+++ b/configure.ac
@@ -708,7 +708,7 @@ XEXT_LIB='$(top_builddir)/Xext/libXext.la'
XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'
dnl Core modules for most extensions, et al.
-REQUIRED_MODULES="[randrproto >= 1.2.99.3] [renderproto >= 0.11] [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto [xextproto >= 7.0.99.1] [xproto >= 7.0.13] [xtrans >= 1.2.2] bigreqsproto resourceproto fontsproto [inputproto >= 1.9.99.14] [kbproto >= 1.0.3]"
+REQUIRED_MODULES="[randrproto >= 1.2.99.3] [renderproto >= 0.11] [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto [xextproto >= 7.0.99.1] [xproto >= 7.0.13] [xtrans >= 1.2.2] bigreqsproto resourceproto fontsproto [inputproto >= 1.9.99.15] [kbproto >= 1.0.3]"
REQUIRED_LIBS="xfont xau fontenc [pixman-1 >= 0.15.14]"
dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas
diff --git a/dix/events.c b/dix/events.c
index f6369f6c6..4ddf80237 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -117,7 +117,6 @@ of the copyright holder.
#endif
#include <X11/X.h>
-#include <X11/keysym.h>
#include "misc.h"
#include "resource.h"
#include <X11/Xproto.h>
@@ -3375,8 +3374,6 @@ CheckPassiveGrabsOnWindow(
/* Check for XI2 and XI grabs first */
tempGrab.type = GetXI2Type((InternalEvent*)event);
tempGrab.grabtype = GRABTYPE_XI2;
- if (event->type == ET_KeyPress)
- tempGrab.detail.exact = XkbGetKeysym(device, event);
if (GrabMatchesSecond(&tempGrab, grab, FALSE))
match = XI2_MATCH;
diff --git a/dix/grabs.c b/dix/grabs.c
index 06d6d037c..4a351d647 100644
--- a/dix/grabs.c
+++ b/dix/grabs.c
@@ -451,7 +451,7 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab)
any_modifier = (pMinuendGrab->grabtype == GRABTYPE_XI2) ?
(unsigned int)XIAnyModifier : (unsigned int)AnyModifier;
any_key = (pMinuendGrab->grabtype == GRABTYPE_XI2) ?
- (unsigned int)XIAnyKeysym : (unsigned int)AnyKey;
+ (unsigned int)XIAnyKeycode : (unsigned int)AnyKey;
ndels = nadds = nups = 0;
ok = TRUE;
for (grab = wPassiveGrabs(pMinuendGrab->window);
diff --git a/test/input.c b/test/input.c
index e2faaeff9..8beb9fa9b 100644
--- a/test/input.c
+++ b/test/input.c
@@ -643,10 +643,10 @@ static void dix_grab_matching(void)
rc = GrabMatchesSecond(&b, &a, FALSE);
g_assert(rc == TRUE);
- /* AnyKey or XIAnyKeysym must succeed */
+ /* AnyKey or XIAnyKeycode must succeed */
a.grabtype = GRABTYPE_XI2;
b.grabtype = GRABTYPE_XI2;
- a.detail.exact = XIAnyKeysym;
+ a.detail.exact = XIAnyKeycode;
b.detail.exact = 1;
a.modifiersDetail.exact = 1;
b.modifiersDetail.exact = 1;