Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent fullscreen focus thievery #1126

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions sway/handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ static void positioner_place_window(wlc_handle handle) {
/* default */
} else {
geo.origin.x -= geo.size.w / 2;
}
}

sway_log(L_DEBUG, "xdg-positioner: placing window %" PRIuPTR " "
"sized (%u,%u) offset by (%d,%d), "
Expand Down Expand Up @@ -605,10 +605,13 @@ static void handle_view_state_request(wlc_handle view, enum wlc_view_state_bit s
sway_log(L_DEBUG, "setting view %" PRIuPTR " %s, fullscreen %d", view, c->name, toggle);
arrange_windows(c->parent, -1, -1);
// Set it as focused window for that workspace if its going fullscreen
swayc_t *ws = swayc_parent_by_type(c, C_WORKSPACE);
if (toggle) {
swayc_t *ws = swayc_parent_by_type(c, C_WORKSPACE);
// Set ws focus to c
set_focused_container_for(ws, c);
ws->fullscreen = c;
} else {
ws->fullscreen = NULL;
}
}
break;
Expand Down