summaryrefslogtreecommitdiffstats
path: root/src/shell.c
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2022-04-27 15:44:58 +0300
committerMarius Vlad <marius.vlad@collabora.com>2022-05-03 06:56:40 +0000
commit13ac8bab43fffd002196d3a6760eefaa8944def2 (patch)
treecfb2c7b11eb423b4fb8724fa6609c2035903c6c2 /src/shell.c
parent2cd345013ccaaccd74e61e6a14546bc861f8b5b1 (diff)
layout: Send dimensions when setting up property as fullscreen
Instead of doing it at commit time, do it right after getting the xdg toplevel surface such that clients can use it from the beginning. This now includes fullscreen, besides regular desktop roles, and it avoid mapping the fullscreen upon commit if the dimensions do not really match up. Bug-AGL: SPEC-4339 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I7185b10770c69d1d6572b0bc025c4a58fe431c67
Diffstat (limited to 'src/shell.c')
-rw-r--r--src/shell.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/shell.c b/src/shell.c
index f874fd0..bf14302 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -613,9 +613,9 @@ ivi_check_pending_desktop_surface_remote(struct ivi_surface *surface)
return false;
}
-
-bool
-ivi_check_pending_surface(struct ivi_surface *surface)
+void
+ivi_check_pending_surface_desktop(struct ivi_surface *surface,
+ enum ivi_surface_role *role)
{
struct ivi_compositor *ivi = surface->ivi;
struct wl_list *role_pending_list;
@@ -626,39 +626,45 @@ ivi_check_pending_surface(struct ivi_surface *surface)
const char *app_id =
weston_desktop_surface_get_app_id(surface->dsurface);
- if (!app_id)
- return false;
+ if (!app_id) {
+ *role = IVI_SURFACE_ROLE_NONE;
+ return;
+ }
role_pending_list = &ivi->popup_pending_apps;
wl_list_for_each(p_popup, role_pending_list, link) {
if (!strcmp(app_id, p_popup->app_id)) {
- return true;
+ *role = IVI_SURFACE_ROLE_POPUP;
+ return;
}
}
role_pending_list = &ivi->split_pending_apps;
wl_list_for_each(p_split, role_pending_list, link) {
if (!strcmp(app_id, p_split->app_id)) {
- return true;
+ *role = IVI_SURFACE_ROLE_SPLIT_V;
+ return;
}
}
role_pending_list = &ivi->fullscreen_pending_apps;
wl_list_for_each(p_fullscreen, role_pending_list, link) {
if (!strcmp(app_id, p_fullscreen->app_id)) {
- return true;
+ *role = IVI_SURFACE_ROLE_FULLSCREEN;
+ return;
}
}
role_pending_list = &ivi->remote_pending_apps;
wl_list_for_each(p_remote, role_pending_list, link) {
if (!strcmp(app_id, p_remote->app_id)) {
- return true;
+ *role = IVI_SURFACE_ROLE_REMOTE;
+ return;
}
}
/* else, we are a regular desktop surface */
- return false;
+ *role = IVI_SURFACE_ROLE_DESKTOP;
}