summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2024-08-18 15:16:45 +0300
committerMarius Vlad <marius.vlad@collabora.com>2024-08-23 10:15:35 +0300
commit8fc74410e9617b61465a31c0fc6da7af227f0946 (patch)
treea11c0b1051fd7a3c3c40841e18ae286c09c44381
parent256742a9f36617fee2fe567d665f600820e4939a (diff)
compositor: Add option to disable black curtainsricefish_18.0.1ricefish/18.0.118.0.1ricefish
Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I089b52fd9a908bb7b7b6b78119c1c34216b4be21 (cherry picked from commit c8ffca8f9c67114ca424b88df0740943fe7768e3)
-rw-r--r--src/compositor.c7
-rw-r--r--src/ivi-compositor.h3
-rw-r--r--src/shell.c14
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;