]> git.sur5r.net Git - i3/i3/blobdiff - src/con.c
Raise floating window to top when it gets focus
[i3/i3] / src / con.c
index df115230732d8c7f4d9afbd41efffaf0494124f1..2e22619f3d838968de6840a29d130ed61bbbcfc4 100644 (file)
--- a/src/con.c
+++ b/src/con.c
@@ -243,6 +243,13 @@ void con_focus(Con *con) {
         workspace_update_urgent_flag(con_get_workspace(con));
         ipc_send_window_event("urgent", con);
     }
+
+    /* Focusing a container with a floating parent should raise it to the top. Since
+     * con_focus is called recursively for each parent we don't need to use
+     * con_inside_floating(). */
+    if (con->type == CT_FLOATING_CON) {
+        floating_raise_con(con);
+    }
 }
 
 /*