summaryrefslogtreecommitdiff
path: root/src/ui/root.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-08-06 12:09:11 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-08-06 12:09:11 +0300
commit4c176d97043e33bb9d2db264f0ecb4912e32d553 (patch)
treea4f77b9e543e6c433abfce1793dbf78bc265a977 /src/ui/root.c
parent018bbd0f90809108c04019d7f661f157250edc1c (diff)
InputWidget: Return key, input focus behavior
In the long-form text entry mode, don't use the user's configured Return key behavior, since that's meant for shorter input fields. Input fields no longer lose focus when the window loses input focus, but the cursor will stop blinking. This makes it easier to resume typing after switching window focus, and also on macOS the symbol picker is easier to use.
Diffstat (limited to 'src/ui/root.c')
-rw-r--r--src/ui/root.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/root.c b/src/ui/root.c
index c61f1b35..a8b9f998 100644
--- a/src/ui/root.c
+++ b/src/ui/root.c
@@ -358,9 +358,9 @@ static iBool handleRootCommands_(iWidget *root, const char *cmd) {
358 return iTrue; 358 return iTrue;
359 } 359 }
360 else if (equal_Command(cmd, "window.focus.lost")) { 360 else if (equal_Command(cmd, "window.focus.lost")) {
361#if !defined (iPlatformMobile) /* apps don't share input focus on mobile */ 361//#if !defined (iPlatformMobile) /* apps don't share input focus on mobile */
362 setFocus_Widget(NULL); 362// setFocus_Widget(NULL);
363#endif 363//#endif
364 setTextColor_LabelWidget(findWidget_App("winbar.app"), uiAnnotation_ColorId); 364 setTextColor_LabelWidget(findWidget_App("winbar.app"), uiAnnotation_ColorId);
365 setTextColor_LabelWidget(findWidget_App("winbar.title"), uiAnnotation_ColorId); 365 setTextColor_LabelWidget(findWidget_App("winbar.title"), uiAnnotation_ColorId);
366 return iFalse; 366 return iFalse;