]> git.sur5r.net Git - i3/i3/blobdiff - src/output.c
Merge pull request #3430 from Synray/aspect_ratio
[i3/i3] / src / output.c
index c76dfd035d213360ef727663b3e98ff49fba6db4..19a7c4afafcecddccfb40e199449bf0b13e788f7 100644 (file)
@@ -10,7 +10,7 @@
 #include "all.h"
 
 /*
- * Returns the output container below the given output container.
+ * Returns the content container below the given output container.
  *
  */
 Con *output_get_content(Con *output) {
@@ -101,6 +101,12 @@ void output_push_sticky_windows(Con *to_focus) {
                 if (con_is_sticky(current)) {
                     bool ignore_focus = (to_focus == NULL) || (current != to_focus->parent);
                     con_move_to_workspace(current, visible_ws, true, false, ignore_focus);
+                    if (!ignore_focus) {
+                        Con *current_ws = con_get_workspace(focused);
+                        con_activate(con_descend_focused(current));
+                        /* Pushing sticky windows shouldn't change the focused workspace. */
+                        con_activate(con_descend_focused(current_ws));
+                    }
                 }
             }
         }