aboutsummaryrefslogtreecommitdiffstats
path: root/xevents.c
diff options
context:
space:
mode:
authorokan2008-05-19 12:56:58 +0000
committerokan2008-05-19 12:56:58 +0000
commit281da1fba3c4cf7c09351c088ec4f5793f9ce96e (patch)
treed82b052fc3c83570cb7162ef2886af15ddb5e0aa /xevents.c
parentca95bca81231c8c082947924b2af0498d914ce96 (diff)
downloadcwm-281da1fba3c4cf7c09351c088ec4f5793f9ce96e.tar.gz
finally implement keyboard binding for group toggling
idea for the "slightly-less-abhorrent-hack-but-a-hack-nonetheless-TM" from oga@ grab and ungrab the keyboard to get around some silly X apps that like stealing events ok oga@
Diffstat (limited to '')
-rw-r--r--xevents.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/xevents.c b/xevents.c
index 9b44f6a..c0e53d0 100644
--- a/xevents.c
+++ b/xevents.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: xevents.c,v 1.14 2008/05/18 20:06:36 okan Exp $
+ * $Id: xevents.c,v 1.15 2008/05/19 12:56:58 okan Exp $
*/
/*
@@ -408,6 +408,7 @@ xev_handle_keyrelease(struct xevent *xev, XEvent *ee)
{
XKeyEvent *e = &ee->xkey;
struct screen_ctx *sc = screen_fromroot(e->root);
+ struct client_ctx *cc = client_current();
int keysym;
keysym = XKeycodeToKeysym(X_Dpy, e->keycode, 0);
@@ -422,6 +423,11 @@ xev_handle_keyrelease(struct xevent *xev, XEvent *ee)
*/
client_mtf(NULL);
+ if (cc != NULL) {
+ group_sticky_toggle_exit(cc);
+ XUngrabKeyboard(X_Dpy, CurrentTime);
+ }
+
out:
xev_register(xev);
}