aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin/gwin_widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gwin/gwin_widget.c')
-rw-r--r--src/gwin/gwin_widget.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gwin/gwin_widget.c b/src/gwin/gwin_widget.c
index 1d270a5f..9dc4d0d8 100644
--- a/src/gwin/gwin_widget.c
+++ b/src/gwin/gwin_widget.c
@@ -153,6 +153,7 @@ static void gwidgetEvent(void *param, GEvent *pe) {
bool_t foundWidget = FALSE;
bool_t endOfListDetected = FALSE;
GHandle nextWidget = gwinGetFocus();
+ GHandle prevWidget = gwinGetFocus();
do {
nextWidget = gwinGetNextWindow(nextWidget);
foundWidget = TRUE;
@@ -189,6 +190,15 @@ static void gwidgetEvent(void *param, GEvent *pe) {
} while (foundWidget == FALSE);
gwinSetFocus(nextWidget);
+ // Redraw the new and the previous focused widget because they usually render differently when
+ // they are not focused anymore (eg. no blinking cursor)
+ if (prevWidget != 0) {
+ gwinRedraw(prevWidget);
+ }
+ if (nextWidget != 0) {
+ gwinRedraw(nextWidget);
+ }
+
break;
}