mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +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:
parent
2f6fd56631
commit
b70e4e9909
4 changed files with 8 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue