diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2023-03-24 16:57:19 +0200 |
---|---|---|
committer | Daniel Stone <daniels@collabora.com> | 2023-04-11 11:26:24 +0000 |
commit | a991691eeeb009c14897674afe5117c1ed77c581 (patch) | |
tree | 2668d019d88834cf83da6034c30e352ead138342 /desktop-shell | |
parent | 27617ec9379f75b5e6156e8e90be98dde94714f4 (diff) | |
download | weston-a991691eeeb009c14897674afe5117c1ed77c581.tar.gz |
desktop-shell: Do not attempt to change the state
Upon connector reconnect/disconnect we seem to ignore any kind of window
state we might have previously to disconnect so this takes that into
account and avoids a change in the state in case we detect one set-up
previously.
Fixes: #731
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Diffstat (limited to 'desktop-shell')
-rw-r--r-- | desktop-shell/shell.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 23d537dc..e695008a 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -4652,6 +4652,10 @@ shell_reposition_view_on_output_change(struct weston_view *view) } } + shsurf = get_shell_surface(view->surface); + if (!shsurf) + return; + if (!visible) { first_output = container_of(ec->output_list.next, struct weston_output, link); @@ -4662,12 +4666,12 @@ shell_reposition_view_on_output_change(struct weston_view *view) weston_view_set_position(view, x, y); } else { weston_view_geometry_dirty(view); - } + if (shsurf->state.maximized || + shsurf->state.fullscreen) + return; + } - shsurf = get_shell_surface(view->surface); - if (!shsurf) - return; shsurf->saved_position_valid = false; set_maximized(shsurf, false); |