summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-10-06 18:13:53 +0200
committerStefano Karapetsas <[email protected]>2013-10-06 18:13:53 +0200
commitbf470188e81dc2d1e17cbd2b4df69868ba7e1c42 (patch)
treebaaec17e9ad4485642148a29cab8f244c91c23f4
parentbd7e0b8c49a423789495678fb65b519c707feed4 (diff)
parentbcf9affe7ba72c62a5e15ce4a6a7aee99d94c47a (diff)
downloadcaja-bf470188e81dc2d1e17cbd2b4df69868ba7e1c42.tar.bz2
caja-bf470188e81dc2d1e17cbd2b4df69868ba7e1c42.tar.xz
Merge branch '1.6' of github.com:mate-desktop/mate-file-manager into 1.6
-rw-r--r--src/caja-window.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/caja-window.c b/src/caja-window.c
index 782e2607..28e1ea35 100644
--- a/src/caja-window.c
+++ b/src/caja-window.c
@@ -1094,10 +1094,37 @@ caja_window_key_press_event (GtkWidget *widget,
GdkEventKey *event)
{
CajaWindow *window;
+ CajaWindowSlot *active_slot;
+ CajaView *view;
+ GtkWidget *focus_widget;
int i;
window = CAJA_WINDOW (widget);
+ active_slot = caja_window_get_active_slot (window);
+ view = active_slot->content_view;
+
+ if (view != NULL && focus_widget != NULL &&
+ GTK_IS_EDITABLE (focus_widget)) {
+ /* if we have input focus on a GtkEditable (e.g. a GtkEntry), forward
+ * the event to it before activating accelerator bindings too.
+ */
+ if (gtk_window_propagate_key_event (GTK_WINDOW (window), event)) {
+ return TRUE;
+ }
+ }
+
+ focus_widget = gtk_window_get_focus (GTK_WINDOW (window));
+ if (view != NULL && focus_widget != NULL &&
+ GTK_IS_EDITABLE (focus_widget)) {
+ /* if we have input focus on a GtkEditable (e.g. a GtkEntry), forward
+ * the event to it before activating accelerator bindings too.
+ */
+ if (gtk_window_propagate_key_event (GTK_WINDOW (window), event)) {
+ return TRUE;
+ }
+ }
+
for (i = 0; i < G_N_ELEMENTS (extra_window_keybindings); i++)
{
if (extra_window_keybindings[i].keyval == event->keyval)