From 8480b4cb58c30a5fa4ff9761aaed198efa8429f8 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 28 Sep 2012 18:23:01 +0200 Subject: [PATCH] =?UTF-8?q?Bugfix:=20don=E2=80=99t=20crash=20when=20dragge?= =?UTF-8?q?d=20floating=20window=20closes=20(Thanks=20darkraven)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, while the loop would not be executed anymore, the callback (for actually repositioning the window after a MotionNotify) would still get called once. This commit avoids that, thus fixing the crash. fixes #819 --- src/floating.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/floating.c b/src/floating.c index 3d2c1d31..5df39bf1 100644 --- a/src/floating.c +++ b/src/floating.c @@ -570,7 +570,7 @@ void drag_pointer(Con *con, const xcb_button_press_event_t *event, xcb_window_t free(inside_event); } while ((inside_event = xcb_poll_for_event(conn)) != NULL); - if (last_motion_notify == NULL) + if (last_motion_notify == NULL || loop_done) continue; new_x = ((xcb_motion_notify_event_t*)last_motion_notify)->root_x;