mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
Spreadsheet+LibGUI: Set EmojiInputDialog as a CaptureInput modal
This has two advantages: First the picker no longer changes the active window state of its parent. Visually this is an additional hint that the dialog is "fragile" and will close on loss of focus. Second, because it contains a search box, its own input won't be preempted by global application shortcuts when typing (pending #15129). This is a problem in apps like PixelPaint which use shortcuts without modifiers.
This commit is contained in:
committed by
Tim Flynn
parent
2f6fd56631
commit
b70e4e9909
@@ -195,7 +195,6 @@ void ConnectionToWindowServer::key_down(i32 window_id, u32 code_point, u32 key,
|
||||
bool focused_widget_accepts_emoji_input = window->focused_widget() && window->focused_widget()->accepts_emoji_input();
|
||||
if (!window->blocks_emoji_input() && focused_widget_accepts_emoji_input && (modifiers == (Mod_Ctrl | Mod_Alt)) && key == Key_Space) {
|
||||
auto emoji_input_dialog = EmojiInputDialog::construct(window);
|
||||
emoji_input_dialog->set_window_mode(GUI::WindowMode::Passive);
|
||||
if (emoji_input_dialog->exec() != EmojiInputDialog::ExecResult::OK)
|
||||
return;
|
||||
key_event->m_key = Key_Invalid;
|
||||
|
||||
Reference in New Issue
Block a user