i3 - improved tiling WM


Add `input_type` enum to `Binding` typedef

Patch status: merged

Patch by Tony Crisci

Long description:

An input type of B_KEYBOARD will indicated this binding was created with
"bindsym", "bindcode", or "bind" and should only run on key press
events.

An input type of B_MOUSE will indicate this binding was created with
"bindmouse" and should only run on button press events (not yet
implemented).

For more information see #558.

To apply this patch, use:
curl http://cr.i3wm.org/patch/372/raw.patch | git am

b/include/data.h

22
@@ -213,6 +213,15 @@ struct regex {
23
  *
24
  */
25
 struct Binding {
26
+    /* The type of input this binding is for. (Mouse bindings are not yet
27
+     * implemented. All bindings are currently assumed to be keyboard bindings.) */
28
+    enum {
29
+        /* Created with "bindsym", "bindcode", and "bind" */
30
+        B_KEYBOARD = 0,
31
+        /* Created with "bindmouse" (not yet implemented). */
32
+        B_MOUSE = 1,
33
+    } input_type;
34
+
35
     /** If true, the binding should be executed upon a KeyRelease event, not a
36
      * KeyPress (the default). */
37
     enum {