diff options
author | Leandro Ribeiro <leandro.ribeiro@collabora.com> | 2023-02-07 12:05:47 -0300 |
---|---|---|
committer | Pekka Paalanen <pq@iki.fi> | 2023-02-14 13:09:36 +0000 |
commit | 831e36c7d9670be3a24440cb1a6ab2f1dcc63152 (patch) | |
tree | 99c3bcc01bbfc2b22eaaa949c5d45dcc712fe88d /desktop-shell | |
parent | 9c511fedba1b0af1b92c82377ba2d747705018b8 (diff) | |
download | weston-831e36c7d9670be3a24440cb1a6ab2f1dcc63152.tar.gz |
Revert "desktop-shell: avoid alternating surface between outputs"
This reverts commit 4eea29151240eb95564f137e6e612f9d583d3daf.
There were some details and cases that I've missed when writing this
commit, resulting in some weird behaviors. Trying to cover all of them
became a nightmare, and the function got really hard to read.
So it's better to revert this commit and think about other possible
solutions for the issue.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Diffstat (limited to 'desktop-shell')
-rw-r--r-- | desktop-shell/shell.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 511b2cc5..d842ec02 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -2063,8 +2063,8 @@ desktop_surface_committed(struct weston_desktop_surface *desktop_surface, weston_desktop_surface_get_surface(desktop_surface); struct weston_view *view = shsurf->view; struct desktop_shell *shell = data; - bool was_fullscreen, should_set_fullscreen; - bool was_maximized, should_set_maximized; + bool was_fullscreen; + bool was_maximized; if (!weston_surface_has_content(surface) && weston_surface_is_unmapping(surface) && @@ -2085,12 +2085,6 @@ desktop_surface_committed(struct weston_desktop_surface *desktop_surface, shsurf->state.maximized = weston_desktop_surface_get_maximized(desktop_surface); - should_set_fullscreen = shsurf->state.fullscreen && - (!was_fullscreen || shsurf->output != - shsurf->fullscreen_output); - should_set_maximized = shsurf->state.maximized && - !was_maximized; - if (!weston_surface_is_mapped(surface)) { map(shell, shsurf); /* as we need to survive the weston_surface destruction we'll @@ -2112,13 +2106,12 @@ desktop_surface_committed(struct weston_desktop_surface *desktop_surface, was_maximized == shsurf->state.maximized) return; - if (was_fullscreen && (!shsurf->state.fullscreen || - shsurf->output != shsurf->fullscreen_output)) + if (was_fullscreen) unset_fullscreen(shsurf); - if (was_maximized && !shsurf->state.maximized) + if (was_maximized) unset_maximized(shsurf); - if ((should_set_fullscreen || should_set_maximized) && + if ((shsurf->state.fullscreen || shsurf->state.maximized) && !shsurf->saved_position_valid) { shsurf->saved_x = shsurf->view->geometry.x; shsurf->saved_y = shsurf->view->geometry.y; @@ -2134,9 +2127,9 @@ desktop_surface_committed(struct weston_desktop_surface *desktop_surface, weston_view_update_transform(shsurf->view); - if (should_set_fullscreen) { + if (shsurf->state.fullscreen) { shell_configure_fullscreen(shsurf); - } else if (should_set_maximized) { + } else if (shsurf->state.maximized) { set_maximized_position(shell, shsurf); surface->output = shsurf->output; } else { |