aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <descalante@igalia.com>2010-02-11 02:55:33 +0800
committerDiego Escalante Urrelo <descalante@igalia.com>2010-02-11 05:45:44 +0800
commit815dfe0f4649f4de6f1dd7f6a1dc454927eb23e5 (patch)
tree7ff31e7af42449ee84dc4951e6702ce778be0077 /src
parent2f139a5d741d94ccf534a5aeaaab2fed7f2accfc (diff)
downloadgsoc2013-epiphany-815dfe0f4649f4de6f1dd7f6a1dc454927eb23e5.tar
gsoc2013-epiphany-815dfe0f4649f4de6f1dd7f6a1dc454927eb23e5.tar.gz
gsoc2013-epiphany-815dfe0f4649f4de6f1dd7f6a1dc454927eb23e5.tar.bz2
gsoc2013-epiphany-815dfe0f4649f4de6f1dd7f6a1dc454927eb23e5.tar.lz
gsoc2013-epiphany-815dfe0f4649f4de6f1dd7f6a1dc454927eb23e5.tar.xz
gsoc2013-epiphany-815dfe0f4649f4de6f1dd7f6a1dc454927eb23e5.tar.zst
gsoc2013-epiphany-815dfe0f4649f4de6f1dd7f6a1dc454927eb23e5.zip
shift+control+click is not shift+click
Bug #604950
Diffstat (limited to 'src')
-rw-r--r--src/ephy-window.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 594f79a27..d3bd6e1b3 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -2260,7 +2260,7 @@ ephy_window_dom_mouse_click_cb (WebKitWebView *view,
{
guint button, modifier, context;
gboolean handled = TRUE;
- gboolean with_control, with_shift, with_shift_control;
+ gboolean with_control, with_shift;
gboolean is_left_click, is_middle_click;
gboolean is_link, is_image, is_middle_clickable;
gboolean middle_click_opens;
@@ -2285,8 +2285,7 @@ ephy_window_dom_mouse_click_cb (WebKitWebView *view,
with_control = (modifier & GDK_CONTROL_MASK) == GDK_CONTROL_MASK;
with_shift = (modifier & GDK_SHIFT_MASK) == GDK_SHIFT_MASK;
- with_shift_control = (modifier & (GDK_SHIFT_MASK | GDK_CONTROL_MASK))
- == (GDK_SHIFT_MASK | GDK_CONTROL_MASK);
+
is_left_click = (button == 1);
is_middle_click = (button == 2);
@@ -2300,17 +2299,23 @@ ephy_window_dom_mouse_click_cb (WebKitWebView *view,
|| (context & WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE));
is_input = (context & WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE) != 0;
- /* shift+click saves the link target */
- if (is_link && is_left_click && with_shift)
- {
- handled = save_property_url (EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (view), event, hit_test_result, "link-uri");
- }
- /* shift+click saves the non-link image
- * Note: pressing enter to submit a form synthesizes a mouse click event
- */
- else if (is_image && is_left_click && with_shift && !is_input)
+ if (is_left_click && with_shift && !with_control)
{
- handled = save_property_url (EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (view), event, hit_test_result, "image-uri");
+ /* shift+click saves the link target */
+ if (is_link)
+ {
+ handled = save_property_url (EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (view), event, hit_test_result, "link-uri");
+ }
+
+ /* Note: pressing enter to submit a form synthesizes a mouse
+ * click event
+ */
+ /* shift+click saves the non-link image */
+ else if (is_image && !is_input)
+ {
+ handled = save_property_url (EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (view), event, hit_test_result, "image-uri");
+ }
+
}
/* middle click opens the selection url */