summaryrefslogtreecommitdiffstats
path: root/src/desktop.c
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2021-11-04 17:32:28 +0200
committerMarius Vlad <marius.vlad@collabora.com>2021-11-05 12:46:25 +0200
commit52df92d73985dba862a157c5ca3003cbe465e295 (patch)
treea3f5039f8a2085b577c8d2df814573b6289bc59d /src/desktop.c
parentb25020f9a5055c4c7c0b584d3cbd328ae0ee230c (diff)
shell: Fix passing maximized state from the start
We've added an optimization where we where sending to regular (desktop) surfaces from the beginning the maximized state, together with the size whenever the client signaled that it is ready to present. That optimization failed to take into account other potential roles, more importanly, the pop-op role which should not be getting any window state, and implicitly shouldn't be getting any surface dimensions, leaving it to the client to decide that. Patch checks all pending lists to make sure we're not skipping any on purpose. Bug-AGL: SPEC-4119 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I4f8c62af545c5955e7fa41c3fd73f52d6c73b600
Diffstat (limited to 'src/desktop.c')
-rw-r--r--src/desktop.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/desktop.c b/src/desktop.c
index 9c1dfae..ac68b78 100644
--- a/src/desktop.c
+++ b/src/desktop.c
@@ -169,11 +169,15 @@ desktop_surface_added(struct weston_desktop_surface *dsurface, void *userdata)
if (output && ivi->shell_client.ready) {
struct ivi_output *ivi_output = to_ivi_output(output);
- weston_log("Setting surface to initial size of surface to %dx%d\n",
- ivi_output->area.width, ivi_output->area.height);
- weston_desktop_surface_set_maximized(dsurface, true);
- weston_desktop_surface_set_size(dsurface,
- ivi_output->area.width, ivi_output->area.height);
+ /* verify if by any chance this surfaces hasn't been assigned a
+ * different role before sending the maximized state */
+ if (!ivi_check_pending_surface(surface)) {
+ weston_log("Setting surface to initial size of surface to %dx%d\n",
+ ivi_output->area.width, ivi_output->area.height);
+ weston_desktop_surface_set_maximized(dsurface, true);
+ weston_desktop_surface_set_size(dsurface,
+ ivi_output->area.width, ivi_output->area.height);
+ }
}
/*
* We delay creating "normal" desktop surfaces until later, to