From: Orestis Floros Date: Tue, 21 Aug 2018 18:06:00 +0000 (+0300) Subject: floating_drag_window: return on DRAG_REVERT X-Git-Tag: 4.16~56^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5d89bd344fb325c2a74cf962f3f931ac274c128e;p=i3%2Fi3 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. --- 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)