shared: fix binding-modifier none

Fix binding-modifier "none" which was defaulting to Super.

Commit [1] introduced the original support for "none" but the logic was
subsequently lost in f7ba35f5.

[1] 553d1248 ("desktop-shell: Allow binding-modifier weston.ini option to be none")

Fixes: #976

Fixes: f7ba35f5 ("kiosk-shell: Enable debug keybindings")
Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
This commit is contained in:
Ian Ray 2024-11-20 20:21:00 +02:00
parent c313543364
commit fc278fb3cc

View file

@ -600,7 +600,7 @@ weston_config_get_binding_modifier(struct weston_config *config,
weston_config_section_get_string(shell_section,
"binding-modifier", &mod_string, "super");
if (!mod_string || !strcmp(mod_string, "none"))
if (!mod_string)
mod = default_mod;
else if (!strcmp(mod_string, "super"))
mod = MODIFIER_SUPER;
@ -610,6 +610,8 @@ weston_config_get_binding_modifier(struct weston_config *config,
mod = MODIFIER_CTRL;
else if (!strcmp(mod_string, "shift"))
mod = MODIFIER_SHIFT;
else if (!strcmp(mod_string, "none"))
mod = 0;
free(mod_string);