aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-rw-r--r--sway/desktop/xdg_shell.c11
-rw-r--r--sway/desktop/xdg_shell_v6.c11
-rw-r--r--sway/desktop/xwayland.c11
-rw-r--r--sway/tree/view.c10
4 files changed, 10 insertions, 33 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c
index 5b53653d..4690a3c5 100644
--- a/sway/desktop/xdg_shell.c
+++ b/sway/desktop/xdg_shell.c
@@ -401,17 +401,6 @@ static void handle_map(struct wl_listener *listener, void *data) {
view_update_csd_from_client(view, csd);
}
- if (config->popup_during_fullscreen == POPUP_LEAVE &&
- view->container->workspace &&
- view->container->workspace->fullscreen &&
- view->container->workspace->fullscreen->view &&
- xdg_surface->toplevel->parent) {
- struct sway_container *fs = view->container->workspace->fullscreen;
- if (is_transient_for(view, fs->view)) {
- container_set_fullscreen(fs, false);
- }
- }
-
if (xdg_surface->toplevel->client_pending.fullscreen) {
container_set_fullscreen(view->container, true);
arrange_workspace(view->container->workspace);
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c
index ac42cfed..ff950c70 100644
--- a/sway/desktop/xdg_shell_v6.c
+++ b/sway/desktop/xdg_shell_v6.c
@@ -396,17 +396,6 @@ static void handle_map(struct wl_listener *listener, void *data) {
WLR_SERVER_DECORATION_MANAGER_MODE_CLIENT;
view_update_csd_from_client(view, csd);
- if (config->popup_during_fullscreen == POPUP_LEAVE &&
- view->container->workspace &&
- view->container->workspace->fullscreen &&
- view->container->workspace->fullscreen->view &&
- xdg_surface->toplevel->parent) {
- struct sway_container *fs = view->container->workspace->fullscreen;
- if (is_transient_for(view, fs->view)) {
- container_set_fullscreen(fs, false);
- }
- }
-
if (xdg_surface->toplevel->client_pending.fullscreen) {
container_set_fullscreen(view->container, true);
arrange_workspace(view->container->workspace);
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index 2bdb7dc0..ebf2131e 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -407,17 +407,6 @@ static void handle_map(struct wl_listener *listener, void *data) {
// Put it back into the tree
view_map(view, xsurface->surface);
- if (config->popup_during_fullscreen == POPUP_LEAVE &&
- view->container->workspace &&
- view->container->workspace->fullscreen &&
- view->container->workspace->fullscreen->view &&
- xsurface->parent) {
- struct sway_container *fs = view->container->workspace->fullscreen;
- if (is_transient_for(view, fs->view)) {
- container_set_fullscreen(fs, false);
- }
- }
-
if (xsurface->fullscreen) {
container_set_fullscreen(view->container, true);
arrange_workspace(view->container->workspace);
diff --git a/sway/tree/view.c b/sway/tree/view.c
index b107d871..97525d6b 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -575,6 +575,16 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface) {
view_set_tiled(view, true);
}
+ if (config->popup_during_fullscreen == POPUP_LEAVE &&
+ view->container->workspace &&
+ view->container->workspace->fullscreen &&
+ view->container->workspace->fullscreen->view) {
+ struct sway_container *fs = view->container->workspace->fullscreen;
+ if (view_is_transient_for(view, fs->view)) {
+ container_set_fullscreen(fs, false);
+ }
+ }
+
if (should_focus(view)) {
input_manager_set_focus(input_manager, &view->container->node);
}