summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorOlivier De Cannière <olivier.decanniere96@gmail.com>2022-06-07 18:16:21 +0200
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-06-29 03:29:02 +0000
commitdbad617351d0ff89131853aba7ba772a9748d629 (patch)
treeee756d979e36195e9dde3ccc3770618c493d626b /Userland
parent2a7b3ca4b8dfcc320aea4d51fe9980f4d69aaf35 (diff)
downloadserenity-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.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibGUI/EmojiInputDialog.cpp5
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)