|
@@ -55,6 +55,7 @@ EmojiInputDialog::EmojiInputDialog(Window* parent_window)
|
|
|
set_frameless(true);
|
|
|
set_blocks_command_palette(true);
|
|
|
set_blocks_emoji_input(true);
|
|
|
+ set_window_mode(GUI::WindowMode::CaptureInput);
|
|
|
resize(400, 300);
|
|
|
|
|
|
auto& scrollable_container = *main_widget.find_descendant_of_type_named<GUI::ScrollableContainerWidget>("scrollable_container"sv);
|
|
@@ -90,8 +91,13 @@ EmojiInputDialog::EmojiInputDialog(Window* parent_window)
|
|
|
scrollable_container.horizontal_scrollbar().set_visible(false);
|
|
|
update_displayed_emoji();
|
|
|
|
|
|
- on_active_window_change = [this](bool is_active_window) {
|
|
|
- if (!is_active_window)
|
|
|
+ on_active_input_change = [this](bool is_active_input) {
|
|
|
+ if (!is_active_input)
|
|
|
+ close();
|
|
|
+ };
|
|
|
+
|
|
|
+ on_input_preemption = [this](InputPreemptor preemptor) {
|
|
|
+ if (preemptor != InputPreemptor::ContextMenu)
|
|
|
close();
|
|
|
};
|
|
|
|