From 905440d6d1c6d2a872e3bbb0da4c963bedaf5708 Mon Sep 17 00:00:00 2001 From: Jonas Maaskola Date: Wed, 5 Feb 2014 17:29:42 +0100 Subject: [PATCH] Resize floating windows by right-clicking decoration --- src/click.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/click.c b/src/click.c index b6eb948c..33d5a4d7 100644 --- a/src/click.c +++ b/src/click.c @@ -237,9 +237,9 @@ static int route_click(Con *con, xcb_button_press_event_t *event, const bool mod return 1; } - /* 5: resize (floating) if this was a click on the left/right/bottom - * border. also try resizing (tiling) if it was a click on the top - * border, but continue if that does not work */ + /* 5: resize (floating) if this was a (left or right) click on the + * left/right/bottom border, or a right click on the decoration. + * also try resizing (tiling) if it was a click on the top */ if (mod_pressed && event->detail == 3) { DLOG("floating resize due to floatingmodifier\n"); floating_resize_window(floatingcon, proportional, event); @@ -253,6 +253,12 @@ static int route_click(Con *con, xcb_button_press_event_t *event, const bool mod goto done; } + if (dest == CLICK_DECORATION && event->detail == 3) { + DLOG("floating resize due to decoration right click\n"); + floating_resize_window(floatingcon, proportional, event); + return 1; + } + if (dest == CLICK_BORDER) { DLOG("floating resize due to border click\n"); floating_resize_window(floatingcon, proportional, event); -- 2.39.5