[Xfce4-commits] <midori:master> Mouse button handling with WebKit2 except URL paste
Christian Dywan
noreply at xfce.org
Sat Apr 6 00:08:03 CEST 2013
Updating branch refs/heads/master
to 910547a6a3542bd1c9e9acca58b002d5851b51f4 (commit)
from 473e3087e9cd6dbc2768a3cdcb7abe4fa39884ac (commit)
commit 910547a6a3542bd1c9e9acca58b002d5851b51f4
Author: Christian Dywan <christian at twotoasts.de>
Date: Fri Apr 5 23:33:39 2013 +0200
Mouse button handling with WebKit2 except URL paste
midori/midori-view.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/midori/midori-view.c b/midori/midori-view.c
index d81bb88..3c57423 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -1713,7 +1713,10 @@ webkit_web_view_hovering_over_link_cb (WebKitWebView* web_view,
{
#ifdef HAVE_WEBKIT2
if (!webkit_hit_test_result_context_is_link (hit_test_result))
+ {
+ katze_assign (view->link_uri, NULL);
return;
+ }
const gchar* link_uri = webkit_hit_test_result_get_link_uri (hit_test_result);
#endif
@@ -1783,7 +1786,6 @@ midori_view_web_view_button_press_event_cb (WebKitWebView* web_view,
GdkEventButton* event,
MidoriView* view)
{
-#ifndef HAVE_WEBKIT2
GtkClipboard* clipboard;
gchar* uri;
gchar* new_uri;
@@ -1842,13 +1844,10 @@ midori_view_web_view_button_press_event_cb (WebKitWebView* web_view,
if (midori_settings_get_middle_click_opens_selection (MIDORI_SETTINGS (view->settings)))
#endif
{
- gboolean is_editable;
- WebKitHitTestResult* result;
- WebKitHitTestResultContext context;
-
- result = webkit_web_view_get_hit_test_result (web_view, event);
- context = katze_object_get_int (result, "context");
- is_editable = context & WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE;
+ #ifndef HAVE_WEBKIT2
+ WebKitHitTestResult* result = webkit_web_view_get_hit_test_result (web_view, event);
+ WebKitHitTestResultContext context = katze_object_get_int (result, "context");
+ gboolean is_editable = context & WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE;
g_object_unref (result);
if (!is_editable)
{
@@ -1900,6 +1899,7 @@ midori_view_web_view_button_press_event_cb (WebKitWebView* web_view,
}
}
}
+ #endif
}
if (MIDORI_MOD_SCROLL (event->state))
{
@@ -1943,7 +1943,6 @@ midori_view_web_view_button_press_event_cb (WebKitWebView* web_view,
/* We propagate the event, since it may otherwise be stuck in WebKit */
g_signal_emit_by_name (view, "event", event, &background);
-#endif
return FALSE;
}
More information about the Xfce4-commits
mailing list