From d23627fda9878f0a8640c24d95145d56882ba503 Mon Sep 17 00:00:00 2001 From: fraggerfox Date: Tue, 28 Sep 2021 09:17:19 +0200 Subject: 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)) --- MainPanel.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/MainPanel.c b/MainPanel.c index e43610a3..07dc6319 100644 --- a/MainPanel.c +++ b/MainPanel.c @@ -61,8 +61,14 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) { if (ch == KEY_RESIZE) return IGNORED; - /* reset on every normal key, except mouse events while mouse support is disabled */ - if (ch != ERR && (ch != KEY_MOUSE || this->state->settings->enableMouse)) + /* reset on every normal key */ + 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; if (EVENT_IS_HEADER_CLICK(ch)) { -- cgit v1.2.3