]> git.sur5r.net Git - i3/i3/commitdiff
Send custom-defined command upon click on the non-statusline part of i3bar even if... 1778/head
authorIngo Bürk <ingo.buerk@tngtech.com>
Wed, 1 Jul 2015 12:48:06 +0000 (14:48 +0200)
committerIngo Bürk <ingo.buerk@tngtech.com>
Wed, 1 Jul 2015 12:48:06 +0000 (14:48 +0200)
fixes #1777

i3bar/src/xcb.c

index 0b6abac68cb9031fc7a91dd0984e5fd8e69963dc..f31d711a80a2b05a2d8d509cb0eb8ab308386395 100644 (file)
@@ -460,11 +460,6 @@ void handle_button(xcb_button_press_event_t *event) {
         x = original_x;
     }
 
-    if (cur_ws == NULL) {
-        DLOG("No workspace active?\n");
-        return;
-    }
-
     /* If a custom command was specified for this mouse button, it overrides
      * the default behavior. */
     binding_t *binding;
@@ -476,6 +471,10 @@ void handle_button(xcb_button_press_event_t *event) {
         return;
     }
 
+    if (cur_ws == NULL) {
+        DLOG("No workspace active?\n");
+        return;
+    }
     switch (event->detail) {
         case 4:
             /* Mouse wheel up. We select the previous ws, if any.