diff options
author | Olivier De Cannière <olivier.decanniere96@gmail.com> | 2022-06-07 18:16:21 +0200 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2022-06-29 03:29:02 +0000 |
commit | dbad617351d0ff89131853aba7ba772a9748d629 (patch) | |
tree | ee756d979e36195e9dde3ccc3770618c493d626b | |
parent | 2a7b3ca4b8dfcc320aea4d51fe9980f4d69aaf35 (diff) | |
download | serenity-dbad617351d0ff89131853aba7ba772a9748d629.zip |
LibGUI: Close EmojiDialog on active window change
This patch makes EmojiDialog be closed whenever the focus moves away
from it just like the CommandPalette.
-rw-r--r-- | Userland/Libraries/LibGUI/EmojiInputDialog.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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) |