From 5d89bd344fb325c2a74cf962f3f931ac274c128e Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Tue, 21 Aug 2018 21:06:00 +0300 Subject: [PATCH] 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. --- src/floating.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/floating.c b/src/floating.c index 9c15bb10..7ba7c9fb 100644 --- a/src/floating.c +++ b/src/floating.c @@ -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) -- 2.39.5