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.
This commit is contained in:
parent
e8dee4308a
commit
5d89bd344f
|
@ -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 the user cancelled, undo the changes. */
|
||||||
if (drag_result == DRAG_REVERT)
|
if (drag_result == DRAG_REVERT) {
|
||||||
floating_reposition(con, initial_rect);
|
floating_reposition(con, initial_rect);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* If this is a scratchpad window, don't auto center it from now on. */
|
/* If this is a scratchpad window, don't auto center it from now on. */
|
||||||
if (con->scratchpad_state == SCRATCHPAD_FRESH)
|
if (con->scratchpad_state == SCRATCHPAD_FRESH)
|
||||||
|
|
Loading…
Reference in New Issue