From befbfbb3bacc9c188ef57f6db9923ca6d7c4877c Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 20 Nov 2020 14:09:48 +0200 Subject: Unfocus UI widgets when window loses input focus --- src/ui/window.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ui') 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) { setFocus_Widget(findWidget_App(cstr_Rangecc(range_Command(cmd, "id")))); return iTrue; } + else if (equal_Command(cmd, "window.focus.lost")) { + setFocus_Widget(NULL); + return iFalse; + } else if (handleCommand_App(cmd)) { return iTrue; } -- cgit v1.2.3