]> Dogcows Code - chaz/openbox/commitdiff
yeah.. so much for lucky 6000
authorDana Jansens <danakj@orodu.net>
Thu, 3 May 2007 04:23:55 +0000 (04:23 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 3 May 2007 04:23:55 +0000 (04:23 +0000)
openbox/keyboard.c

index bee264f6f56f05efb71d7fc25f4bbed7cc9d09aa..30e1e691aad627318149c7c5f45da063402f6ad5 100644 (file)
@@ -240,22 +240,24 @@ gboolean keyboard_process_interactive_grab(const XEvent *e, ObClient **client)
     gboolean done = FALSE;
     gboolean cancel = FALSE;
 
-    if ((e->type == KeyRelease && !(istate.state & e->xkey.state)))
-        done = TRUE;
-    else if (e->type == KeyPress) {
-        /*if (e->xkey.keycode == ob_keycode(OB_KEY_RETURN))
-          done = TRUE;
-          else */if (e->xkey.keycode == ob_keycode(OB_KEY_ESCAPE))
-              cancel = done = TRUE;
-    } else if (e->type == ButtonPress)
-        cancel = done = TRUE;
-
-    if (done) {
-        keyboard_interactive_end(e->xkey.state, cancel, e->xkey.time, TRUE);
-
-        handled = TRUE;
-    } else
-        *client = istate.client;
+    if (istate.active) {
+        if ((e->type == KeyRelease && !(istate.state & e->xkey.state)))
+            done = TRUE;
+        else if (e->type == KeyPress) {
+            /*if (e->xkey.keycode == ob_keycode(OB_KEY_RETURN))
+              done = TRUE;
+              else */if (e->xkey.keycode == ob_keycode(OB_KEY_ESCAPE))
+                  cancel = done = TRUE;
+        } else if (e->type == ButtonPress)
+            cancel = done = TRUE;
+
+        if (done) {
+            keyboard_interactive_end(e->xkey.state, cancel, e->xkey.time,TRUE);
+
+            handled = TRUE;
+        } else
+            *client = istate.client;
+    }
 
     return handled;
 }
@@ -324,8 +326,6 @@ void keyboard_startup(gboolean reconfig)
 
 void keyboard_shutdown(gboolean reconfig)
 {
-    GSList *it;
-
     if (!reconfig)
         client_remove_destructor(keyboard_interactive_end_client);
 
This page took 0.027458 seconds and 4 git commands to generate.