Added an option to disable the mouse.

This commit is contained in:
MartinJM
2019-07-12 21:41:09 +02:00
parent 402e46bb82
commit b0e24cd5a5
4 changed files with 42 additions and 27 deletions

View File

@ -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:
{