drm-backend: add --continue-without-input command line option to DRM-backend

In the test suite we may want to run a DRM-backend test on a
non-default seat, which may not have a input device associated.
Weston's default behavior is to not open if input devices are
not found, as it may cause troubles. For instance, Weston can
open but if no input device is set than the user can not
interact or leave it.

Add flag --continue-without-input to DRM-backend so we can run
these types of tests with no input. Notice that this won't force
the compositor to skip opening a input device if it finds it on
the non-default seat.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
Leandro Ribeiro
2020-05-06 18:10:19 -03:00
committed by Pekka Paalanen
parent 7b37b4d3d7
commit e57d8ae818
4 changed files with 10 additions and 1 deletions
+3 -1
View File
@@ -676,7 +676,8 @@ usage(int error_code)
" --tty=TTY\t\tThe tty to use\n"
" --drm-device=CARD\tThe DRM device to use, e.g. \"card0\".\n"
" --use-pixman\t\tUse the pixman (CPU) renderer\n"
" --current-mode\tPrefer current KMS mode over EDID preferred mode\n\n");
" --current-mode\tPrefer current KMS mode over EDID preferred mode\n"
" --continue-without-input\tAllow the compositor to start without input devices\n\n");
#endif
#if defined(BUILD_FBDEV_COMPOSITOR)
@@ -2523,6 +2524,7 @@ load_drm_backend(struct weston_compositor *c,
{ WESTON_OPTION_STRING, "drm-device", 0, &config.specific_device },
{ WESTON_OPTION_BOOLEAN, "current-mode", 0, &wet->drm_use_current_mode },
{ WESTON_OPTION_BOOLEAN, "use-pixman", 0, &config.use_pixman },
{ WESTON_OPTION_BOOLEAN, "continue-without-input", 0, &config.continue_without_input },
};
parse_options(options, ARRAY_LENGTH(options), argc, argv);