From 9a9c29fff54dc7c99afc3270c9a25365745a812e Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Fri, 1 Aug 2014 16:58:03 +0200 Subject: [PATCH] Add dummy modes for kiosk mode. This allows us to keep the mode_enter() calls in the code untouched, because all modes are still available, event if they don't do anything. --- src/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 3112cf4..f257876 100644 --- a/src/main.c +++ b/src/main.c @@ -778,11 +778,16 @@ static void init_core(void) /* initialize the modes */ mode_init(); - mode_add('n', normal_enter, normal_leave, normal_keypress, NULL); if (!vb.config.kioskmode) { + mode_add('n', normal_enter, normal_leave, normal_keypress, NULL); mode_add('c', ex_enter, ex_leave, ex_keypress, ex_input_changed); mode_add('i', input_enter, input_leave, input_keypress, NULL); mode_add('p', pass_enter, pass_leave, pass_keypress, NULL); + } else { + mode_add('n', NULL, NULL, NULL, NULL); + mode_add('c', NULL, NULL, NULL, NULL); + mode_add('i', NULL, NULL, NULL, NULL); + mode_add('p', NULL, NULL, NULL, NULL); } /* initialize the marks with empty values */ -- 2.20.1