]> git.sur5r.net Git - i3/i3/blobdiff - src/commands.c
Refined the fullscreen focus constraints.
[i3/i3] / src / commands.c
index 1e1ee0ff243190aafa4d9f2a8e34256702618a4c..b3c955e56d926e3b2fe8eab3e795f7c0d534356e 100644 (file)
@@ -1262,13 +1262,9 @@ void cmd_focus(I3_CMD) {
         if (!ws)
             continue;
 
-        /* Don't allow the focus switch if the focused and current
-         * containers are in the same workspace. */
-        if (focused &&
-            focused->type != CT_WORKSPACE &&
-            focused->fullscreen_mode != CF_NONE &&
-            con_get_workspace(focused) == ws) {
-            LOG("Cannot change focus while in fullscreen mode (same workspace).\n");
+        /* Check the fullscreen focus constraints. */
+        if (!con_fullscreen_permits_focusing(current->con)) {
+            LOG("Cannot change focus while in fullscreen mode (fullscreen rules).\n");
             ysuccess(false);
             return;
         }