Merge pull request #3954 from xzfc/floating-tiling-resize
Make floating-tiling resize code consistent with plain tiling resize
This commit is contained in:
10
src/click.c
10
src/click.c
@ -242,18 +242,18 @@ static void route_click(Con *con, xcb_button_press_event_t *event, const bool mo
|
||||
|
||||
/* 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 */
|
||||
* also try resizing (tiling) if possible */
|
||||
if (mod_pressed && event->detail == XCB_BUTTON_CLICK_RIGHT) {
|
||||
DLOG("floating resize due to floatingmodifier\n");
|
||||
floating_resize_window(floatingcon, proportional, event);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!in_stacked && dest == CLICK_DECORATION &&
|
||||
if ((dest == CLICK_BORDER || dest == CLICK_DECORATION) &&
|
||||
is_left_or_right_click) {
|
||||
/* try tiling resize, but continue if it doesn’t work */
|
||||
DLOG("tiling resize with fallback\n");
|
||||
if (tiling_resize(con, event, dest, !was_focused))
|
||||
if (tiling_resize(con, event, dest, dest == CLICK_DECORATION && !was_focused))
|
||||
goto done;
|
||||
}
|
||||
|
||||
@ -290,10 +290,6 @@ static void route_click(Con *con, xcb_button_press_event_t *event, const bool mo
|
||||
else if ((dest == CLICK_BORDER || dest == CLICK_DECORATION) &&
|
||||
is_left_or_right_click) {
|
||||
DLOG("Trying to resize (tiling)\n");
|
||||
/* Since we updated the tree (con_activate() above), we need to
|
||||
* re-render the tree before returning to the event loop (drag_pointer()
|
||||
* inside tiling_resize() runs its own event-loop). */
|
||||
tree_render();
|
||||
tiling_resize(con, event, dest, dest == CLICK_DECORATION && !was_focused);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user