EShellView: Do not process accels when search entry is focused

The accels should be ignored, especially those using a single key,
when the search entry is focused, otherwise that latter could not
be written into the entry. Use the generic function to determine
when the accel should be ignored and when not.
This commit is contained in:
Milan Crha
2025-01-14 13:39:06 +01:00
parent 51e9056b25
commit ec11cb4d1c

View File

@ -645,8 +645,15 @@ e_shell_view_ui_manager_ignore_accel_cb (EUIManager *manager,
EShellView *self = user_data;
gboolean ignore = FALSE;
if (!e_shell_view_is_active (self))
if (e_shell_view_is_active (self)) {
GtkWidget *toplevel;
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (self));
if (GTK_IS_WINDOW (toplevel))
ignore = e_util_ignore_accel_for_focused (gtk_window_get_focus (GTK_WINDOW (toplevel)));
} else {
ignore = TRUE;
}
return ignore;
}