diff --git a/src/config/options.inc b/src/config/options.inc index 2e5b3b46..a31ee5ce 100644 --- a/src/config/options.inc +++ b/src/config/options.inc @@ -1465,6 +1465,14 @@ static union option_info config_options_info[] = { N_("Date format to use in dialogs. See strftime(3).")), #endif +#ifdef CONFIG_MOUSE + /* date added */ + INIT_OPT_BOOL("ui", N_("Disable mouse"), + "mouse_disable", 0, 0, + N_("Disable mouse. " + "Changes take effect at the next elinks restart.")), +#endif + INIT_OPT_BOOL("ui", N_("Set window title"), "window_title", 0, 1, N_("Set the window title when running in a windowing " diff --git a/src/terminal/mouse.c b/src/terminal/mouse.c index 8744cd7c..8124ee8b 100644 --- a/src/terminal/mouse.c +++ b/src/terminal/mouse.c @@ -89,6 +89,9 @@ enable_mouse(void) { int h = get_output_handle(); /* XXX: Is this all right? -- Miciah */ + if (get_opt_bool("ui.mouse_disable", NULL)) + return; + if (mouse_enabled) return; if (is_xterm()) send_mouse_init_sequence(h);