From f6c31eeaf5998649ff6e83738c631c7df4d84a4c Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Thu, 27 Aug 2015 18:42:35 -0300 Subject: [PATCH] Handle KEY_RECLICK events generated by ScreenManager --- AffinityPanel.c | 2 ++ ColorsPanel.c | 1 + ColumnsPanel.c | 2 ++ DisplayOptionsPanel.c | 2 ++ 4 files changed, 7 insertions(+) diff --git a/AffinityPanel.c b/AffinityPanel.c index b400cadb..41f520b5 100644 --- a/AffinityPanel.c +++ b/AffinityPanel.c @@ -6,6 +6,7 @@ in the source distribution for its full text. */ #include "AffinityPanel.h" +#include "CRT.h" #include "CheckItem.h" @@ -23,6 +24,7 @@ static HandlerResult AffinityPanel_eventHandler(Panel* this, int ch) { CheckItem* selected = (CheckItem*) Panel_getSelected(this); switch(ch) { case KEY_MOUSE: + case KEY_RECLICK: case ' ': CheckItem_set(selected, ! (CheckItem_get(selected)) ); return HANDLED; diff --git a/ColorsPanel.c b/ColorsPanel.c index 3c40a477..6072aedc 100644 --- a/ColorsPanel.c +++ b/ColorsPanel.c @@ -65,6 +65,7 @@ static HandlerResult ColorsPanel_eventHandler(Panel* super, int ch) { case 0x0d: case KEY_ENTER: case KEY_MOUSE: + case KEY_RECLICK: case ' ': for (int i = 0; ColorSchemeNames[i] != NULL; i++) CheckItem_set((CheckItem*)Panel_get(super, i), false); diff --git a/ColumnsPanel.c b/ColumnsPanel.c index a7856b41..5733a3ff 100644 --- a/ColumnsPanel.c +++ b/ColumnsPanel.c @@ -10,6 +10,7 @@ in the source distribution for its full text. #include "StringUtils.h" #include "ListItem.h" +#include "CRT.h" #include #include @@ -49,6 +50,7 @@ static HandlerResult ColumnsPanel_eventHandler(Panel* super, int ch) { case 0x0d: case KEY_ENTER: case KEY_MOUSE: + case KEY_RECLICK: { if (selected < size - 1) { this->moving = !(this->moving); diff --git a/DisplayOptionsPanel.c b/DisplayOptionsPanel.c index ac0bbfe9..2b826e09 100644 --- a/DisplayOptionsPanel.c +++ b/DisplayOptionsPanel.c @@ -8,6 +8,7 @@ in the source distribution for its full text. #include "DisplayOptionsPanel.h" #include "CheckItem.h" +#include "CRT.h" #include #include @@ -47,6 +48,7 @@ static HandlerResult DisplayOptionsPanel_eventHandler(Panel* super, int ch) { case 0x0d: case KEY_ENTER: case KEY_MOUSE: + case KEY_RECLICK: case ' ': CheckItem_set(selected, ! (CheckItem_get(selected)) ); result = HANDLED;