aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/focus.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sway/focus.c b/sway/focus.c
index b4dfc423..9db2aaa7 100644
--- a/sway/focus.c
+++ b/sway/focus.c
@@ -88,7 +88,7 @@ swayc_t *get_focused_container(swayc_t *parent) {
88 if (!parent) { 88 if (!parent) {
89 return swayc_active_workspace(); 89 return swayc_active_workspace();
90 } 90 }
91 // get focusde container 91 // get focused container
92 while (!parent->is_focused && parent->focused) { 92 while (!parent->is_focused && parent->focused) {
93 parent = parent->focused; 93 parent = parent->focused;
94 } 94 }
@@ -112,7 +112,9 @@ bool set_focused_container(swayc_t *c) {
112 swayc_t *focused = get_focused_view(workspace); 112 swayc_t *focused = get_focused_view(workspace);
113 // if the workspace we are changing focus to has a fullscreen view return 113 // if the workspace we are changing focus to has a fullscreen view return
114 if (swayc_is_fullscreen(focused) && focused != c) { 114 if (swayc_is_fullscreen(focused) && focused != c) {
115 return false; 115 // if switching to a workspace with a fullscreen view,
116 // focus on the fullscreen view
117 c = focused;
116 } 118 }
117 119
118 // update container focus from here to root, making necessary changes along 120 // update container focus from here to root, making necessary changes along
@@ -192,7 +194,7 @@ bool set_focused_container_for(swayc_t *a, swayc_t *c) {
192 return false; 194 return false;
193 } 195 }
194 196
195 // Check if we changing a parent container that will see chnage 197 // Check if we are changing a parent container that will see change
196 bool effective = true; 198 bool effective = true;
197 while (find != &root_container) { 199 while (find != &root_container) {
198 if (find->parent->focused != find) { 200 if (find->parent->focused != find) {