From: Mikael Magnusson Date: Thu, 6 Jan 2005 18:50:01 +0000 (+0000) Subject: hopefully fix the 'sticky keys' issue, patch from debian maintainer tore who got... X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=9f607e25459434deb85c0c1b757af8599f07a9a5;p=chaz%2Fopenbox hopefully fix the 'sticky keys' issue, patch from debian maintainer tore who got it from somewhere --- diff --git a/openbox/event.c b/openbox/event.c index 16951f75..c997ca59 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -51,6 +51,9 @@ #ifdef HAVE_SIGNAL_H # include #endif +#ifdef XKB +# include +#endif #ifdef USE_SM #include @@ -259,6 +262,9 @@ static void event_set_lasttime(XEvent *e) static void event_hack_mods(XEvent *e) { +#ifdef XKB + XkbStateRec xkb_state; +#endif KeyCode *kp; gint i, k; @@ -274,6 +280,12 @@ static void event_hack_mods(XEvent *e) STRIP_MODS(e->xkey.state); /* remove from the state the mask of the modifier being released, if it is a modifier key being released (this is a little ugly..) */ +#ifdef XKB + if (XkbGetState(ob_display, XkbUseCoreKbd, &xkb_state) == Success) { + e->xkey.state = xkb_state.compat_state; + break; + } +#endif kp = modmap->modifiermap; for (i = 0; i < mask_table_size; ++i) { for (k = 0; k < modmap->max_keypermod; ++k) {