aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-05-29 21:12:24 +0300
committerMarius Vlad <marius.vlad@collabora.com>2020-06-08 23:18:07 +0300
commit90fd86850e4a96367962b840c7c53435caa94898 (patch)
treeb176853f9a932d3fdbbf4b0b46b51c58fb79396e
parentd95b25c6a9dfa6ef7b8d6dfa05c8a2594c045e52 (diff)
layout: Remove the quirks as now we have the policy hooks in place
to handle that With the policy hooks in place we no longer need this quirk to activate surfaces by default when starting up, and was potentially seen as hole to bypass the policy hooks. Remove it and just allow the policy hook to control how that happens. Bug-AGL: SPEC-3280 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I4c28648f0805e5c593c082c644d2e126b1d9df6b
-rw-r--r--src/ivi-compositor.h3
-rw-r--r--src/layout.c8
-rw-r--r--src/main.c16
3 files changed, 2 insertions, 25 deletions
diff --git a/src/ivi-compositor.h b/src/ivi-compositor.h
index 671ceac..e71b6d5 100644
--- a/src/ivi-compositor.h
+++ b/src/ivi-compositor.h
@@ -69,9 +69,6 @@ struct ivi_compositor {
struct wl_global *agl_shell;
struct wl_global *agl_shell_desktop;
- struct {
- bool activate_apps_by_default; /* switches once xdg top level has been 'created' */
- } quirks;
struct {
struct wl_client *client;
diff --git a/src/layout.c b/src/layout.c
index b1ee3f3..760a139 100644
--- a/src/layout.c
+++ b/src/layout.c
@@ -248,14 +248,10 @@ ivi_layout_desktop_committed(struct ivi_surface *surf)
struct ivi_output *ivi_bg_output;
struct ivi_policy *policy = surf->ivi->policy;
- if (policy && policy->api.surface_activate_by_default)
- if (policy->api.surface_activate_by_default(surf, surf->ivi))
- goto skip_config_check;
-
- if (!surf->ivi->quirks.activate_apps_by_default)
+ if (policy && policy->api.surface_activate_by_default &&
+ !policy->api.surface_activate_by_default(surf, surf->ivi))
return;
-skip_config_check:
/* we can only activate it again by using the protocol */
if (surf->activated_by_default)
return;
diff --git a/src/main.c b/src/main.c
index 306ad6e..cad8a42 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1126,20 +1126,6 @@ usage(int error_code)
exit(error_code);
}
-static void
-ivi_compositor_get_quirks(struct ivi_compositor *ivi)
-{
- struct weston_config_section *section;
-
- if (!ivi->config)
- return;
-
- section = weston_config_get_section(ivi->config, "shell", NULL, NULL);
- weston_config_section_get_bool(section, "activate-by-default",
- &ivi->quirks.activate_apps_by_default, 0);
-
-}
-
int main(int argc, char *argv[])
{
struct ivi_compositor ivi = { 0 };
@@ -1217,8 +1203,6 @@ int main(int argc, char *argv[])
backend = choose_default_backend();
}
- ivi_compositor_get_quirks(&ivi);
-
display = wl_display_create();
loop = wl_display_get_event_loop(display);