From dbad617351d0ff89131853aba7ba772a9748d629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20De=20Canni=C3=A8re?= Date: Tue, 7 Jun 2022 18:16:21 +0200 Subject: [PATCH] LibGUI: Close EmojiDialog on active window change This patch makes EmojiDialog be closed whenever the focus moves away from it just like the CommandPalette. --- Userland/Libraries/LibGUI/EmojiInputDialog.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Userland/Libraries/LibGUI/EmojiInputDialog.cpp b/Userland/Libraries/LibGUI/EmojiInputDialog.cpp index e43168517c..bb441808e5 100644 --- a/Userland/Libraries/LibGUI/EmojiInputDialog.cpp +++ b/Userland/Libraries/LibGUI/EmojiInputDialog.cpp @@ -92,6 +92,11 @@ EmojiInputDialog::EmojiInputDialog(Window* parent_window) } } } + + on_active_window_change = [this](bool is_active_window) { + if (!is_active_window) + close(); + }; } void EmojiInputDialog::event(Core::Event& event)