[Commits] [SCM] claws branch, master, updated. 3.15.0-34-gab84747

ticho at claws-mail.org ticho at claws-mail.org
Sat Apr 22 01:18:33 CEST 2017


The branch, master has been updated
       via  ab847472955f979cb63bf0a9b576383e51ef5094 (commit)
      from  fd6bb2ab3c69ddfbe3e500f011186bdde6ab6a62 (commit)

Summary of changes:
 src/plugins/fancy/fancy_viewer.c |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)


- Log -----------------------------------------------------------------
commit ab847472955f979cb63bf0a9b576383e51ef5094
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sat Apr 22 01:15:30 2017 +0200

    Fancy: simplify open-or-not decision to x,y matching or not
    
    Fixes bug #3814:  end of mouse drag or text selection erroneously
    activates links

diff --git a/src/plugins/fancy/fancy_viewer.c b/src/plugins/fancy/fancy_viewer.c
index 625ff96..9af29f2 100644
--- a/src/plugins/fancy/fancy_viewer.c
+++ b/src/plugins/fancy/fancy_viewer.c
@@ -826,21 +826,19 @@ static gint keypress_events_cb (GtkWidget *widget, GdkEventKey *event,
 static gboolean release_button_cb (WebKitWebView *view, GdkEvent *ev,
 				   FancyViewer *viewer)
 {
-	gint type, x, y;
+	gint x, y;
 	WebKitHitTestResult *result;
 
 	if (ev->button.button == 1 && viewer->cur_link && viewer->override_prefs_external) {
 		result = webkit_web_view_get_hit_test_result(view, (GdkEventButton *)ev);
 		g_object_get(G_OBJECT(result),
-				"context", &type,
 				"x", &x, "y", &y,
 				NULL);
 
-		/* If the link we are hovering over is also part of a text
-		 * selection, we only want to open it if this button release
-		 * is part of a simple click, not a press-drag-release chain. */
-		if (type & WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION
-				&& (x != viewer->click_x || y != viewer->click_y))
+		/* If this button release is end of a drag or selection event
+		 * (button press happened on different coordinates), we do not
+		 * want to open the link. */
+		if ((x != viewer->click_x || y != viewer->click_y))
 			return FALSE;
 
 		open_uri(viewer->cur_link, prefs_common_get_uri_cmd());

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list