floating_drag_window: return on DRAG_REVERT

Right now tree_render() is called twice on DRAG_REVERT since
floating_reposition calls it.
Also, on DRAG_REVERT the scratchpad state shouldn't change since the
user canceled the action.
next
Orestis Floros 2018-08-21 21:06:00 +03:00
parent e8dee4308a
commit 5d89bd344f
No known key found for this signature in database
GPG Key ID: E9AD9F32E401E38F
1 changed files with 3 additions and 1 deletions

View File

@ -537,8 +537,10 @@ void floating_drag_window(Con *con, const xcb_button_press_event_t *event) {
}
/* If the user cancelled, undo the changes. */
if (drag_result == DRAG_REVERT)
if (drag_result == DRAG_REVERT) {
floating_reposition(con, initial_rect);
return;
}
/* If this is a scratchpad window, don't auto center it from now on. */
if (con->scratchpad_state == SCRATCHPAD_FRESH)