Add configuration option for no input device.
As it has been discussed in the past [1], running Weston without any input device at launch might be beneficial for some use cases. Certainly, it's best for the vast majority of users (and the project) to require an input device to be present, as to avoid frustration and hassle, but for those brave souls that so prefer, this patch lets them run without any input device at all. This introduces a simple configuration in weston.ini: [core] require-input=true True is the default, so no behavioral change is introduced. [1] https://lists.freedesktop.org/archives/wayland-devel/2015-November/025193.html Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
committed by
Daniel Stone
parent
2dae4d0110
commit
75b7197f4e
@@ -1738,6 +1738,7 @@ int main(int argc, char *argv[])
|
||||
struct wl_listener primary_client_destroyed;
|
||||
struct weston_seat *seat;
|
||||
struct wet_compositor user_data;
|
||||
int require_input;
|
||||
|
||||
const struct weston_option core_options[] = {
|
||||
{ WESTON_OPTION_STRING, "backend", 'B', &backend },
|
||||
@@ -1822,6 +1823,10 @@ int main(int argc, char *argv[])
|
||||
if (weston_compositor_init_config(ec, config) < 0)
|
||||
goto out;
|
||||
|
||||
weston_config_section_get_bool(section, "require-input",
|
||||
&require_input, true);
|
||||
ec->require_input = require_input;
|
||||
|
||||
if (load_backend(ec, backend, &argc, argv, config) < 0) {
|
||||
weston_log("fatal: failed to create compositor backend\n");
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user