summaryrefslogtreecommitdiff
path: root/desktop-shell
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2022-08-29 18:31:52 +0300
committerMarius Vlad <marius.vlad@collabora.com>2022-11-10 13:06:07 +0200
commitbf0c99f51986737c26e01c331b3e9d82ef099bd1 (patch)
treeaa62d65057c321370baca3e5679925f44adf91d3 /desktop-shell
parent91750cdbd4eba322ddc2389a5b5d5b9d04b6f434 (diff)
downloadweston-bf0c99f51986737c26e01c331b3e9d82ef099bd1.tar.gz
libweston/desktop, desktop-shell: Add getters for pending state
This introduces a few getters to retrieve the pending state from libweston-desktop, now just libweston, and makes use of it, specifically get_pending_maximized to avoid sending invalid dimensions to the client in the particular use case set_maximized/unset_fullscreen. These pending state getters are useful to query/poke a not-applied yet state, and could be useful where we don't have a buffer attached where the client might be set-up as maximized, but internally libweston hasn't yet applied that pending state. Fixes #645 Suggested-by: Morgane Glidic <sardemff7+git@sardemff7.net> Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Diffstat (limited to 'desktop-shell')
-rw-r--r--desktop-shell/shell.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 2ab7d72d..e9f74087 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -2177,7 +2177,8 @@ set_fullscreen(struct shell_surface *shsurf, bool fullscreen,
}
weston_desktop_surface_set_orientation(shsurf->desktop_surface,
WESTON_TOP_LEVEL_TILED_ORIENTATION_NONE);
- } else if (weston_desktop_surface_get_maximized(desktop_surface)) {
+ } else if (weston_desktop_surface_get_maximized(desktop_surface) ||
+ weston_desktop_surface_get_pending_maximized(desktop_surface)) {
get_maximized_size(shsurf, &width, &height);
}
weston_desktop_surface_set_fullscreen(desktop_surface, fullscreen);