aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/tree/root.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sway/tree/root.c b/sway/tree/root.c
index 6759b6cf..a3830976 100644
--- a/sway/tree/root.c
+++ b/sway/tree/root.c
@@ -149,6 +149,12 @@ void root_scratchpad_show(struct sway_container *con) {
149 seat_set_focus(seat, seat_get_focus_inactive(seat, &con->node)); 149 seat_set_focus(seat, seat_get_focus_inactive(seat, &con->node));
150} 150}
151 151
152static void disable_fullscreen(struct sway_container *con, void *data) {
153 if (con->fullscreen_mode != FULLSCREEN_NONE) {
154 container_fullscreen_disable(con);
155 }
156}
157
152void root_scratchpad_hide(struct sway_container *con) { 158void root_scratchpad_hide(struct sway_container *con) {
153 struct sway_seat *seat = input_manager_current_seat(); 159 struct sway_seat *seat = input_manager_current_seat();
154 struct sway_node *focus = seat_get_focus_inactive(seat, &root->node); 160 struct sway_node *focus = seat_get_focus_inactive(seat, &root->node);
@@ -160,9 +166,8 @@ void root_scratchpad_hide(struct sway_container *con) {
160 return; 166 return;
161 } 167 }
162 168
163 if (con->fullscreen_mode != FULLSCREEN_NONE) { 169 disable_fullscreen(con, NULL);
164 container_fullscreen_disable(con); 170 container_for_each_child(con, disable_fullscreen, NULL);
165 }
166 container_detach(con); 171 container_detach(con);
167 arrange_workspace(ws); 172 arrange_workspace(ws);
168 if (&con->node == focus || node_has_ancestor(focus, &con->node)) { 173 if (&con->node == focus || node_has_ancestor(focus, &con->node)) {