diff options
-rw-r--r-- | src/ivi-compositor.h | 1 | ||||
-rw-r--r-- | src/layout.c | 6 | ||||
-rw-r--r-- | src/main.c | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/src/ivi-compositor.h b/src/ivi-compositor.h index efa6373..b2342eb 100644 --- a/src/ivi-compositor.h +++ b/src/ivi-compositor.h @@ -54,6 +54,7 @@ struct ivi_compositor { bool init_failed; bool hide_cursor; + bool activate_by_default; /* * Options parsed from command line arugments. diff --git a/src/layout.c b/src/layout.c index 0363af7..b1d8b3d 100644 --- a/src/layout.c +++ b/src/layout.c @@ -328,6 +328,12 @@ ivi_layout_desktop_committed(struct ivi_surface *surf) return; } + if (!surf->ivi->activate_by_default) { + weston_log("Refusing to activate surface role %d, app_id %s\n", + surf->role, app_id); + return; + } + /* use the output of the bg to activate the app on start-up by * default */ if (surf->view && r_output) { @@ -1527,6 +1527,7 @@ int main(int argc, char *argv[]) } /* from [core] */ weston_config_section_get_bool(section, "hide-cursor", &ivi.hide_cursor, false); + weston_config_section_get_bool(section, "activate-by-default", &ivi.activate_by_default, true); display = wl_display_create(); loop = wl_display_get_event_loop(display); |