desktop-shell: Refuse to set a surface to maximized

For a surface that is already fullscreen making it maximized means to
exit fullscreen then set to it maximized. Instead of doing it, refuse to
do anything until the user explicitly performs that operation.

With this approach we follow other DE (desktop environments) which would
not perform any operation until the user exits fullscreen state.

Fixes #321

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
Marius Vlad 2020-12-11 22:23:58 +02:00 committed by Daniel Stone
parent fed2ee51f2
commit 70353dace3
1 changed files with 3 additions and 0 deletions

View File

@ -2685,6 +2685,9 @@ set_maximized(struct shell_surface *shsurf, bool maximized)
weston_desktop_surface_get_surface(shsurf->desktop_surface);
int32_t width = 0, height = 0;
if (weston_desktop_surface_get_fullscreen(desktop_surface))
return;
if (maximized) {
struct weston_output *output;