compositor: Allow passing continue-without-input 89/27589/2
authorMarius Vlad <marius.vlad@collabora.com>
Wed, 1 Jun 2022 09:12:49 +0000 (12:12 +0300)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Mon, 13 Jun 2022 12:44:14 +0000 (12:44 +0000)
We can specify over cmd line if we don't have any input devices.
Found while investigating xdg-shell and keyboard activation.

Bug-AGL: SPEC-4415
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I54be16e38922c5216f8075074bd1d47468ec07a3

src/compositor.c

index 49ee90d..7540fe3 100644 (file)
@@ -876,14 +876,15 @@ load_drm_backend(struct ivi_compositor *ivi, int *argc, char *argv[])
        int use_current_mode = 0;
        int use_pixman = 0;
        bool use_shadow;
+       bool without_input = false;
        int ret;
 
        const struct weston_option options[] = {
                { WESTON_OPTION_STRING, "seat", 0, &config.seat_id },
-               { WESTON_OPTION_INTEGER, "tty", 0, &config.tty },
                { WESTON_OPTION_STRING, "drm-device", 0, &config.specific_device },
                { WESTON_OPTION_BOOLEAN, "current-mode", 0, &use_current_mode },
                { WESTON_OPTION_BOOLEAN, "use-pixman", 0, &use_pixman },
+               { WESTON_OPTION_BOOLEAN, "continue-without-input", false, &without_input }
        };
 
        parse_options(options, ARRAY_LENGTH(options), argc, argv);
@@ -898,6 +899,9 @@ load_drm_backend(struct ivi_compositor *ivi, int *argc, char *argv[])
        weston_config_section_get_bool(section, "pixman-shadow", &use_shadow, 1);
        config.use_pixman_shadow = use_shadow;
 
+       if (without_input)
+               ivi->compositor->require_input = !without_input;
+
        ret = weston_compositor_load_backend(ivi->compositor, WESTON_BACKEND_DRM,
                                             &config.base);
        if (ret < 0)