Removed mode_input_focusout callback.
authorDaniel Carl <danielcarl@gmx.de>
Thu, 3 Oct 2013 18:50:51 +0000 (20:50 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Thu, 3 Oct 2013 18:50:51 +0000 (20:50 +0200)
This breaks the switching to input mode via hinting, because if the hints
caused entering the input mode we move the focus from inputbox, that called
the callback that forced switching to normal mode.

src/main.c
src/mode.c

index 1be841c..33aaa4e 100644 (file)
@@ -740,11 +740,8 @@ static void setup_signals()
     g_signal_connect(
         G_OBJECT(vb.gui.window), "key-press-event", G_CALLBACK(map_keypress), NULL
     );
-    g_object_connect(
-        G_OBJECT(vb.gui.input),
-        "signal::focus-in-event", G_CALLBACK(mode_input_focusin), NULL,
-        "signal::focus-out-event", G_CALLBACK(mode_input_focusout), NULL,
-        NULL
+    g_signal_connect(
+        G_OBJECT(vb.gui.input), "focus-in-event", G_CALLBACK(mode_input_focusin), NULL
     );
     g_object_connect(
         G_OBJECT(vb.gui.buffer),
index a1b2b4d..15a926b 100644 (file)
@@ -122,14 +122,6 @@ gboolean mode_input_focusin(GtkWidget *widget, GdkEventFocus *event, gpointer da
     return false;
 }
 
-gboolean mode_input_focusout(GtkWidget *widget, GdkEventFocus *event, gpointer data)
-{
-    /* if focus is lesft from inputbox - switch back to normal mode */
-    mode_enter('n');
-
-    return false;
-}
-
 /**
  * Process input changed event on current active mode.
  */