commit 508f481fbb0cc8d079da9038e1599eec2cbb874d
parent 16dc31f33b201e949f912f993ef927c72a307b88
Author: Drew DeVault <sir@cmpwn.com>
Date: Tue, 24 May 2016 08:01:08 -0400
Merge pull request #671 from zandrmartin/fullscreen-focus
set focus on fullscreen view when changing focus
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sway/focus.c b/sway/focus.c
@@ -88,7 +88,7 @@ swayc_t *get_focused_container(swayc_t *parent) {
if (!parent) {
return swayc_active_workspace();
}
- // get focusde container
+ // get focused container
while (!parent->is_focused && parent->focused) {
parent = parent->focused;
}
@@ -112,7 +112,9 @@ bool set_focused_container(swayc_t *c) {
swayc_t *focused = get_focused_view(workspace);
// if the workspace we are changing focus to has a fullscreen view return
if (swayc_is_fullscreen(focused) && focused != c) {
- return false;
+ // if switching to a workspace with a fullscreen view,
+ // focus on the fullscreen view
+ c = focused;
}
// 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) {
return false;
}
- // Check if we changing a parent container that will see chnage
+ // Check if we are changing a parent container that will see change
bool effective = true;
while (find != &root_container) {
if (find->parent->focused != find) {