summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2022-04-12 21:05:06 +0300
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2022-06-10 21:22:30 +0000
commit00ba5b334e6c0b18f71f1c9529e5a4debc85f321 (patch)
tree98991698823b4b4f7f28418806b0f24ecd3d04d2
parent0f98b6c74c79513294b4dd5acf8d1cafe4023304 (diff)
compositor: Rename activated_by_default to mapped
This variable is about surface being displayed, rather than being activatred so use mapped to better reflect that. It also makes things easier to keep track per surface about surfaces being activated by default or not. No functional change whatsoever. Bug-AGL: SPEC-4302 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ib0c508dff3eef593d86f259b55ff4e7087313a69 (cherry picked from commit 7ecc8c2ee8a776bb1d57df22cb74493633c6f6e1)
-rw-r--r--src/desktop.c2
-rw-r--r--src/ivi-compositor.h2
-rw-r--r--src/layout.c26
3 files changed, 15 insertions, 15 deletions
diff --git a/src/desktop.c b/src/desktop.c
index 849e272..74f0e21 100644
--- a/src/desktop.c
+++ b/src/desktop.c
@@ -164,7 +164,7 @@ desktop_surface_added(struct weston_desktop_surface *dsurface, void *userdata)
surface->ivi = ivi;
surface->dsurface = dsurface;
surface->role = IVI_SURFACE_ROLE_NONE;
- surface->activated_by_default = false;
+ surface->mapped = false;
surface->advertised_on_launch = false;
surface->checked_pending = false;
wl_list_init(&surface->link);
diff --git a/src/ivi-compositor.h b/src/ivi-compositor.h
index e12be18..9aadd62 100644
--- a/src/ivi-compositor.h
+++ b/src/ivi-compositor.h
@@ -264,7 +264,7 @@ struct ivi_surface {
int32_t x, y;
int32_t width, height;
} pending;
- bool activated_by_default;
+ bool mapped;
bool advertised_on_launch;
bool checked_pending;
enum {
diff --git a/src/layout.c b/src/layout.c
index 700a318..5541632 100644
--- a/src/layout.c
+++ b/src/layout.c
@@ -283,7 +283,7 @@ ivi_layout_desktop_committed(struct ivi_surface *surf)
* we can't make use here of the ivi_layout_get_output_from_surface()
* due to the fact that we'll always land here when a surface performs
* a commit and pending_output will not bet set. This works in tandem
- * with 'activated_by_default' at this point to avoid tripping over
+ * with 'mapped' at this point to avoid tripping over
* to a surface that continuously updates its content
*/
if (surf->role == IVI_SURFACE_ROLE_DESKTOP)
@@ -299,7 +299,7 @@ ivi_layout_desktop_committed(struct ivi_surface *surf)
return;
/* we can only activate it again by using the protocol */
- if (surf->activated_by_default)
+ if (surf->mapped)
return;
/* check first if there aren't any outputs being set */
@@ -339,7 +339,7 @@ ivi_layout_desktop_committed(struct ivi_surface *surf)
weston_desktop_surface_get_app_id(surf->dsurface),
ivi_layout_get_surface_role_name(surf));
ivi_layout_activate(r_output, app_id);
- surf->activated_by_default = true;
+ surf->mapped = true;
} else if (!app_id) {
/*
* applications not setting an app_id, or
@@ -351,7 +351,7 @@ ivi_layout_desktop_committed(struct ivi_surface *surf)
weston_log("Surface no app_id, role %s activating by default\n",
ivi_layout_get_surface_role_name(surf));
ivi_layout_activate_by_surf(r_output, surf);
- surf->activated_by_default = true;
+ surf->mapped = true;
}
}
@@ -368,7 +368,7 @@ ivi_layout_desktop_committed(struct ivi_surface *surf)
* ivi_layout_activate_complete() terminates so we use the
* current active surface to avoid hitting this again and again
* */
- if (surf->activated_by_default && output->active == surf)
+ if (surf->mapped && output->active == surf)
return;
if (app_id) {
@@ -376,7 +376,7 @@ ivi_layout_desktop_committed(struct ivi_surface *surf)
weston_desktop_surface_get_app_id(surf->dsurface),
ivi_layout_get_surface_role_name(surf));
ivi_layout_activate(output, app_id);
- surf->activated_by_default = true;
+ surf->mapped = true;
}
return;
}
@@ -415,7 +415,7 @@ ivi_layout_fullscreen_committed(struct ivi_surface *surface)
if (policy && policy->api.surface_activate_by_default &&
!policy->api.surface_activate_by_default(surface, surface->ivi) &&
- !surface->activated_by_default)
+ !surface->mapped)
return;
assert(surface->role == IVI_SURFACE_ROLE_FULLSCREEN);
@@ -527,7 +527,7 @@ ivi_layout_split_committed(struct ivi_surface *surface)
if (policy && policy->api.surface_activate_by_default &&
!policy->api.surface_activate_by_default(surface, surface->ivi) &&
- !surface->activated_by_default)
+ !surface->mapped)
return;
if (surface->view->is_mapped)
@@ -625,7 +625,7 @@ ivi_layout_popup_committed(struct ivi_surface *surface)
if (policy && policy->api.surface_activate_by_default &&
!policy->api.surface_activate_by_default(surface, surface->ivi) &&
- !surface->activated_by_default)
+ !surface->mapped)
return;
if (surface->view->is_mapped)
@@ -680,8 +680,8 @@ ivi_layout_popup_re_add(struct ivi_surface *surface)
/* reset the activate by default in order to (still) allow the surface
* to be activaved using the request */
- if (!surface->activated_by_default)
- surface->activated_by_default = true;
+ if (!surface->mapped)
+ surface->mapped = true;
ivi_layout_popup_committed(surface);
}
@@ -699,8 +699,8 @@ ivi_layout_surface_is_split_or_fullscreen(struct ivi_surface *surf)
/* reset the activate by default in order to (still) allow the surface
* to be activaved using the request */
- if (!surf->activated_by_default)
- surf->activated_by_default = true;
+ if (!surf->mapped)
+ surf->mapped = true;
wl_list_for_each(is, &ivi->surfaces, link)
if (is == surf)