diff options
author | Diego Escalante Urrelo <descalante@igalia.com> | 2010-02-24 23:26:28 +0800 |
---|---|---|
committer | Diego Escalante Urrelo <descalante@igalia.com> | 2010-02-26 06:56:33 +0800 |
commit | 7795f72123d8aced9247c512a708583cef62b95a (patch) | |
tree | d4f5999f4b163ed704181f1758db951e8a8d672c /src | |
parent | 763d3dcfb0a577ba6ae7535705a75a5eb064c3b1 (diff) | |
download | gsoc2013-epiphany-7795f72123d8aced9247c512a708583cef62b95a.tar gsoc2013-epiphany-7795f72123d8aced9247c512a708583cef62b95a.tar.gz gsoc2013-epiphany-7795f72123d8aced9247c512a708583cef62b95a.tar.bz2 gsoc2013-epiphany-7795f72123d8aced9247c512a708583cef62b95a.tar.lz gsoc2013-epiphany-7795f72123d8aced9247c512a708583cef62b95a.tar.xz gsoc2013-epiphany-7795f72123d8aced9247c512a708583cef62b95a.tar.zst gsoc2013-epiphany-7795f72123d8aced9247c512a708583cef62b95a.zip |
Correctly handle shit+click only in ephy-window
If we handle shift+click in EphyWebView default handler then we will be
preventing WebKit from getting *any* shift+click event, this breaks shift+click
for extending selection. Removing that however makes shift+click browse to
links just as click would do. The solution is to prevent
policy_decision_required_cb to browse to the clicked link when it includes the
shift modifier.
Bug #610844
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-window.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index 91f99307a..21ed75841 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -2521,6 +2521,15 @@ policy_decision_required_cb (WebKitWebView *web_view, { flags |= EPHY_NEW_TAB_IN_EXISTING_WINDOW; } + /* Because we connect to button-press-event *after* + * (G_CONNECT_AFTER) we need to prevent WebKit from browsing to + * a link when you shift+click it. Otherwise when you + * shift+click a link to download it you would also be taken to + * the link destination. */ + else if (button == 1 && state == GDK_SHIFT_MASK) + { + return TRUE; + } /* Those were our special cases, we won't handle this */ else { |