mirror of
https://github.com/swaywm/sway.git
synced 2024-12-30 17:06:40 +01:00
root_scratchpad_hide: disable fullscreen descendants
Any descendant of a scratchpad container may be fullscreen so checking to see if the top-level scratchpad container is fullscreen in root_scratchpad_hide is not sufficient. This iterates through all descendants of the scratchpad container
This commit is contained in:
parent
218b5b9dc0
commit
0278c4db6f
1 changed files with 8 additions and 3 deletions
|
@ -149,6 +149,12 @@ void root_scratchpad_show(struct sway_container *con) {
|
||||||
seat_set_focus(seat, seat_get_focus_inactive(seat, &con->node));
|
seat_set_focus(seat, seat_get_focus_inactive(seat, &con->node));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void disable_fullscreen(struct sway_container *con, void *data) {
|
||||||
|
if (con->fullscreen_mode != FULLSCREEN_NONE) {
|
||||||
|
container_fullscreen_disable(con);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void root_scratchpad_hide(struct sway_container *con) {
|
void root_scratchpad_hide(struct sway_container *con) {
|
||||||
struct sway_seat *seat = input_manager_current_seat();
|
struct sway_seat *seat = input_manager_current_seat();
|
||||||
struct sway_node *focus = seat_get_focus_inactive(seat, &root->node);
|
struct sway_node *focus = seat_get_focus_inactive(seat, &root->node);
|
||||||
|
@ -160,9 +166,8 @@ void root_scratchpad_hide(struct sway_container *con) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (con->fullscreen_mode != FULLSCREEN_NONE) {
|
disable_fullscreen(con, NULL);
|
||||||
container_fullscreen_disable(con);
|
container_for_each_child(con, disable_fullscreen, NULL);
|
||||||
}
|
|
||||||
container_detach(con);
|
container_detach(con);
|
||||||
arrange_workspace(ws);
|
arrange_workspace(ws);
|
||||||
if (&con->node == focus || node_has_ancestor(focus, &con->node)) {
|
if (&con->node == focus || node_has_ancestor(focus, &con->node)) {
|
||||||
|
|
Loading…
Reference in a new issue