i3 - improved tiling WM


Resize floating windows by right-clicking decoration

Patch status: merged

Patch by Jonas Maaskola

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

b/src/click.c

13
@@ -237,9 +237,9 @@ static int route_click(Con *con, xcb_button_press_event_t *event, const bool mod
14
             return 1;
15
         }
16
 
17
-        /* 5: resize (floating) if this was a click on the left/right/bottom
18
-         * border. also try resizing (tiling) if it was a click on the top
19
-         * border, but continue if that does not work */
20
+        /*  5: resize (floating) if this was a (left or right) click on the
21
+         * left/right/bottom border, or a right click on the decoration.
22
+         * also try resizing (tiling) if it was a click on the top */
23
         if (mod_pressed && event->detail == 3) {
24
             DLOG("floating resize due to floatingmodifier\n");
25
             floating_resize_window(floatingcon, proportional, event);
26
@@ -253,6 +253,12 @@ static int route_click(Con *con, xcb_button_press_event_t *event, const bool mod
27
                 goto done;
28
         }
29
 
30
+        if (dest == CLICK_DECORATION && event->detail == 3) {
31
+            DLOG("floating resize due to decoration right click\n");
32
+            floating_resize_window(floatingcon, proportional, event);
33
+            return 1;
34
+        }
35
+
36
         if (dest == CLICK_BORDER) {
37
             DLOG("floating resize due to border click\n");
38
             floating_resize_window(floatingcon, proportional, event);