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>
This commit is contained in:
Marius Vlad 2023-03-24 16:57:19 +02:00 committed by Daniel Stone
parent 27617ec937
commit a991691eee

View File

@ -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,13 +4666,13 @@ 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);
set_fullscreen(shsurf, false, NULL);