]> git.sur5r.net Git - i3/i3/blobdiff - src/floating.c
Reduce repetition in cmd_move_con_to_workspace*
[i3/i3] / src / floating.c
index 14988818418c972e70a9d1181cf10d990c886256..85bd8cc051370dc0f3d95f3922df50212425b1cb 100644 (file)
@@ -449,6 +449,7 @@ bool floating_maybe_reassign_ws(Con *con) {
     Con *ws = TAILQ_FIRST(&(content->focus_head));
     DLOG("Moving con %p / %s to workspace %p / %s\n", con, con->name, ws, ws->name);
     con_move_to_workspace(con, ws, false, true, false);
+    workspace_show(ws);
     con_focus(con_descend_focused(con));
     return true;
 }
@@ -746,8 +747,10 @@ static void xcb_drag_prepare_cb(EV_P_ ev_prepare *w, int revents) {
         if (last_motion_notify != (xcb_motion_notify_event_t *)event)
             free(event);
 
-        if (dragloop->result != DRAGGING)
+        if (dragloop->result != DRAGGING) {
+            free(last_motion_notify);
             return;
+        }
     }
 
     if (last_motion_notify == NULL)