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>
This commit is contained in:
Peter Hutterer 2009-07-20 16:39:16 +10:00
parent afc3e3b595
commit 9a1bfa5664
5 changed files with 8 additions and 11 deletions

View File

@ -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;
}

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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;