Adds a missing HAVE_GETMOUSE check.

Fixes builds failing with error
MainPanel.c:65:62: error: 'Settings {aka struct Settings_}' has no member named 'enableMouse'
    if (ch != ERR && (ch != KEY_MOUSE || this->state->settings->enableMouse))
This commit is contained in:
fraggerfox 2021-09-28 09:17:19 +02:00 committed by BenBE
parent 4c846921a6
commit d23627fda9
1 changed files with 8 additions and 2 deletions

View File

@ -61,8 +61,14 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) {
if (ch == KEY_RESIZE) if (ch == KEY_RESIZE)
return IGNORED; return IGNORED;
/* reset on every normal key, except mouse events while mouse support is disabled */ /* reset on every normal key */
if (ch != ERR && (ch != KEY_MOUSE || this->state->settings->enableMouse)) bool needReset = ch != ERR;
#ifdef HAVE_GETMOUSE
/* except mouse events while mouse support is disabled */
if (!(ch != KEY_MOUSE || this->state->settings->enableMouse))
needReset = false;
#endif
if (needReset)
this->state->hideProcessSelection = false; this->state->hideProcessSelection = false;
if (EVENT_IS_HEADER_CLICK(ch)) { if (EVENT_IS_HEADER_CLICK(ch)) {