Bugfix: don’t crash when dragged floating window closes (Thanks darkraven)

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
next
Michael Stapelberg 2012-09-28 18:23:01 +02:00
parent 6a9fdebc87
commit 8480b4cb58
1 changed files with 1 additions and 1 deletions

View File

@ -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;