diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-20 14:09:48 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-20 14:09:48 +0200 |
commit | befbfbb3bacc9c188ef57f6db9923ca6d7c4877c (patch) | |
tree | dd20bbce7fa756d774e2148fe380df92948c1721 /src | |
parent | df0e00463c5b55f89471720c1bf4d83e1f428aae (diff) |
Unfocus UI widgets when window loses input focus
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/window.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ui/window.c b/src/ui/window.c index 7cc035f5..1cad63f5 100644 --- a/src/ui/window.c +++ b/src/ui/window.c | |||
@@ -81,6 +81,10 @@ static iBool handleRootCommands_(iWidget *root, const char *cmd) { | |||
81 | setFocus_Widget(findWidget_App(cstr_Rangecc(range_Command(cmd, "id")))); | 81 | setFocus_Widget(findWidget_App(cstr_Rangecc(range_Command(cmd, "id")))); |
82 | return iTrue; | 82 | return iTrue; |
83 | } | 83 | } |
84 | else if (equal_Command(cmd, "window.focus.lost")) { | ||
85 | setFocus_Widget(NULL); | ||
86 | return iFalse; | ||
87 | } | ||
84 | else if (handleCommand_App(cmd)) { | 88 | else if (handleCommand_App(cmd)) { |
85 | return iTrue; | 89 | return iTrue; |
86 | } | 90 | } |