diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2024-08-18 15:16:45 +0300 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2024-08-18 15:23:54 +0300 |
commit | c26b97ea1a3f03589b349dfe0bc710008ace9486 (patch) | |
tree | f51023fee4a9046984b442ef8040d0b87d7faf8c | |
parent | b7f5733b9ce72dd3d39cc8c5e5c208c5295d5ea8 (diff) |
compositor: Add option to disable black curtains
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I089b52fd9a908bb7b7b6b78119c1c34216b4be21
-rw-r--r-- | src/compositor.c | 7 | ||||
-rw-r--r-- | src/ivi-compositor.h | 3 | ||||
-rw-r--r-- | src/shell.c | 14 |
3 files changed, 15 insertions, 9 deletions
diff --git a/src/compositor.c b/src/compositor.c index 58037f9..5d3af25 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -2051,6 +2051,7 @@ int wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_da struct weston_log_subscriber *logger; int ret = EXIT_FAILURE; bool xwayland = false; + bool no_black_curtain = false; struct sigaction action; char *renderer = NULL; struct wet_process *process, *process_tmp; @@ -2064,6 +2065,7 @@ int wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_da { WESTON_OPTION_BOOLEAN, "version", 0, &version }, { WESTON_OPTION_BOOLEAN, "no-config", 0, &no_config }, { WESTON_OPTION_BOOLEAN, "debug", 0, &debug }, + { WESTON_OPTION_BOOLEAN, "no-black-curtain", false, &no_black_curtain }, { WESTON_OPTION_STRING, "config", 'c', &config_file }, { WESTON_OPTION_STRING, "modules", 0, &option_modules }, { WESTON_OPTION_STRING, "debug-scopes", 'l', &debug_scopes }, @@ -2233,7 +2235,10 @@ int wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_da if (create_listening_socket(display, socket_name) < 0) goto error_compositor; - ivi_shell_init_black_fs(&ivi); + if (!no_black_curtain) { + weston_log("Installing black curtains\n"); + ivi_shell_init_black_fs(&ivi); + } ivi.compositor->exit = handle_exit; diff --git a/src/ivi-compositor.h b/src/ivi-compositor.h index 695cf95..01afd17 100644 --- a/src/ivi-compositor.h +++ b/src/ivi-compositor.h @@ -572,4 +572,7 @@ ivi_init_parsed_options(struct weston_compositor *compositor); void ivi_process_destroy(struct wet_process *process, int status, bool call_cleanup); +void +create_black_curtain_view(struct ivi_output *output); + #endif diff --git a/src/shell.c b/src/shell.c index c29d89e..b107fa2 100644 --- a/src/shell.c +++ b/src/shell.c @@ -46,9 +46,6 @@ #include "agl-shell-server-protocol.h" #include "agl-shell-desktop-server-protocol.h" -static void -create_black_curtain_view(struct ivi_output *output); - static uint32_t reverse_orientation(uint32_t orientation); @@ -143,9 +140,11 @@ ivi_set_desktop_surface_remote(struct ivi_surface *surface) /* if thew black surface view is mapped on the mean we need * to remove it in order to start showing the 'remote' surface * just being added */ - view = output->fullscreen_view.fs->view; - if (view->is_mapped || view->surface->is_mapped) - remove_black_curtain(output); + if (output->fullscreen_view.fs) { + view = output->fullscreen_view.fs->view; + if (view->is_mapped || view->surface->is_mapped) + remove_black_curtain(output); + } wl_list_insert(&ivi->surfaces, &surface->link); } @@ -1034,8 +1033,7 @@ curtain_surface_committed(struct weston_surface *es, struct weston_coord_surface } - -static void +void create_black_curtain_view(struct ivi_output *output) { struct weston_surface *surface = NULL; |