]> spindle.queued.net Git - midori/commitdiff
Focus the web view when middle click pasting w/o Ctrl
authorChristian Dywan <christian@twotoasts.de>
Fri, 29 Aug 2008 00:29:48 +0000 (02:29 +0200)
committerChristian Dywan <christian@twotoasts.de>
Fri, 29 Aug 2008 00:29:48 +0000 (02:29 +0200)
midori/midori-webview.c

index d28a83f062e3037a52e9257b1a6b3e361a26101c..7f920da5df030a6fdc7971cdd18aa54842312f89 100644 (file)
@@ -21,7 +21,7 @@
 #include "compat.h"
 
 #if HAVE_GIO
-#include <gio/gio.h>
+    #include <gio/gio.h>
 #endif
 #include <webkit/webkit.h>
 #include <string.h>
@@ -472,8 +472,8 @@ gjs_value_links_foreach_cb (GjsValue*      link,
                             MidoriWebView* web_view)
 {
     const gchar* type;
-    const gchar* rel;
 #if HAVE_GIO
+    const gchar* rel;
     GFile* icon_file;
     GIcon* icon;
 #endif
@@ -601,7 +601,10 @@ gtk_widget_button_press_event_after (MidoriWebView*  web_view,
             if (state & GDK_CONTROL_MASK)
                 g_signal_emit (web_view, signals[NEW_TAB], 0, new_uri);
             else
+            {
                 g_object_set (web_view, "uri", new_uri, NULL);
+                gtk_widget_grab_focus (GTK_WIDGET (web_view));
+            }
             g_free (new_uri);
             g_free (uri);
             return TRUE;