]> git.sur5r.net Git - i3/i3/blobdiff - src/floating.c
Merge branch 'next' into master
[i3/i3] / src / floating.c
index 14988818418c972e70a9d1181cf10d990c886256..e958153d6a647ab5242188d932f28e1b3ae19e98 100644 (file)
@@ -318,7 +318,7 @@ void floating_enable(Con *con, bool automatic) {
     render_con(con, false);
 
     if (set_focus)
-        con_focus(con);
+        con_activate(con);
 
     /* Check if we need to re-assign it to a different workspace because of its
      * coordinates and exit if that was done successfully. */
@@ -382,7 +382,7 @@ void floating_disable(Con *con, bool automatic) {
     con_fix_percent(con->parent);
 
     if (set_focus)
-        con_focus(con);
+        con_activate(con);
 
     floating_set_hint_atom(con, false);
     ipc_send_window_event("floating", con);
@@ -449,7 +449,8 @@ 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);
-    con_focus(con_descend_focused(con));
+    workspace_show(ws);
+    con_activate(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)