]> git.sur5r.net Git - i3/i3/commitdiff
Merge pull request #3366 from orestisf1993/NUM_HANDLERS
authorIngo Bürk <admin@airblader.de>
Tue, 21 Aug 2018 18:38:31 +0000 (20:38 +0200)
committerGitHub <noreply@github.com>
Tue, 21 Aug 2018 18:38:31 +0000 (20:38 +0200)
property_notify: use NUM_HANDLERS

src/floating.c

index 9c15bb10e243ca1eec3c1289648107f0c57948ab..279d4c997178680ca78fab5aa064802479afcc06 100644 (file)
@@ -742,9 +742,14 @@ static bool drain_drag_events(EV_P, struct drag_x11_cb *dragloop) {
             free(event);
 
         if (dragloop->result != DRAGGING) {
-            free(last_motion_notify);
             ev_break(EV_A_ EVBREAK_ONE);
-            return true;
+            if (dragloop->result == DRAG_SUCCESS) {
+                /* Ensure motion notify events are handled. */
+                break;
+            } else {
+                free(last_motion_notify);
+                return true;
+            }
         }
     }
 
@@ -766,7 +771,7 @@ static bool drain_drag_events(EV_P, struct drag_x11_cb *dragloop) {
     FREE(last_motion_notify);
 
     xcb_flush(conn);
-    return false;
+    return dragloop->result != DRAGGING;
 }
 
 static void xcb_drag_prepare_cb(EV_P_ ev_prepare *w, int revents) {