backend-drm: Fix ignoring config 'require-input' option

Without this patch, the DRM-backend would rewrite the 'require-input',
core section option given by the user.

This removes 'continue_without_input' DRM-backend option and takes into
consideration the cmd line option only if that was passed (Pekka Paalanen).

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
Marius Vlad
2020-12-06 13:10:18 +02:00
parent e630d2d0d0
commit a86b590fea
3 changed files with 5 additions and 6 deletions
+4 -1
View File
@@ -2514,6 +2514,7 @@ load_drm_backend(struct weston_compositor *c,
struct weston_drm_backend_config config = {{ 0, }};
struct weston_config_section *section;
struct wet_compositor *wet = to_wet_compositor(c);
bool without_input = false;
int ret = 0;
wet->drm_use_current_mode = false;
@@ -2528,7 +2529,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 },
{ WESTON_OPTION_BOOLEAN, "continue-without-input", false, &without_input }
};
parse_options(options, ARRAY_LENGTH(options), argc, argv);
@@ -2541,6 +2542,8 @@ load_drm_backend(struct weston_compositor *c,
&config.pageflip_timeout, 0);
weston_config_section_get_bool(section, "pixman-shadow",
&config.use_pixman_shadow, true);
if (without_input)
c->require_input = !without_input;
config.base.struct_version = WESTON_DRM_BACKEND_CONFIG_VERSION;
config.base.struct_size = sizeof(struct weston_drm_backend_config);