From b0e24cd5a577a8eca5590683ae6aca4df61be6bb Mon Sep 17 00:00:00 2001 From: MartinJM Date: Fri, 12 Jul 2019 21:41:09 +0200 Subject: Added an option to disable the mouse. --- ScreenManager.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ScreenManager.c') diff --git a/ScreenManager.c b/ScreenManager.c index 06e90193..db117b65 100644 --- a/ScreenManager.c +++ b/ScreenManager.c @@ -163,7 +163,7 @@ static Panel* setCurrentPanel(Panel* panel) { void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) { bool quit = false; int focus = 0; - + Panel* panelFocus = setCurrentPanel((Panel*) Vector_get(this->panels, focus)); double oldTime = 0.0; @@ -181,7 +181,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) { if (this->header) { checkRecalculation(this, &oldTime, &sortTimeout, &redraw, &rescan, &timedOut); } - + if (redraw) { ScreenManager_drawPanels(this, focus); } @@ -191,7 +191,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) { ch = getch(); HandlerResult result = IGNORED; - if (ch == KEY_MOUSE) { + if (ch == KEY_MOUSE && this->settings->enableMouse) { ch = ERR; MEVENT mevent; int ok = getmouse(&mevent); @@ -269,7 +269,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) { quit = true; continue; } - + switch (ch) { case KEY_RESIZE: { -- cgit v1.2.3