compositor-{drm, fbdev, rpi}: Make VT switching configurable
Add a new boolean weston.ini option, "vt-switching" to enable or
disable Ctrl-Alt-Fn key combinations.
Signed-off-by: Bob Ham <bob.ham@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
(Derek Foreman changed the prototype for switch_vt_binding to
have a weston_keyboard * instead of weston_seat *. The pointer
wasn't used, so this is just a warning fix.)
diff --git a/src/main.c b/src/main.c
index 6d2216f..1850fa6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -499,6 +499,7 @@
struct xkb_rule_names xkb_names;
struct weston_config_section *s;
int repaint_msec;
+ int vt_switching;
s = weston_config_get_section(config, "keyboard", NULL, NULL);
weston_config_section_get_string(s, "keymap_rules",
@@ -520,6 +521,10 @@
weston_config_section_get_int(s, "repeat-delay",
&ec->kb_repeat_delay, 400);
+ weston_config_section_get_bool(s, "vt-switching",
+ &vt_switching, true);
+ ec->vt_switching = vt_switching;
+
s = weston_config_get_section(config, "core", NULL, NULL);
weston_config_section_get_int(s, "repaint-window", &repaint_msec,
ec->repaint_msec);