aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2009-01-04 22:46:33 +0800
committerXan Lopez <xan@src.gnome.org>2009-01-04 22:46:33 +0800
commit1ecd13da9865d272b02251f4c119ca7fe7113e64 (patch)
tree8ffe9f1070447ad63d98db5bea599b465419264b /src
parent75df77ae61aa3f2148d5a61eeef1c5f281e42864 (diff)
downloadgsoc2013-epiphany-1ecd13da9865d272b02251f4c119ca7fe7113e64.tar
gsoc2013-epiphany-1ecd13da9865d272b02251f4c119ca7fe7113e64.tar.gz
gsoc2013-epiphany-1ecd13da9865d272b02251f4c119ca7fe7113e64.tar.bz2
gsoc2013-epiphany-1ecd13da9865d272b02251f4c119ca7fe7113e64.tar.lz
gsoc2013-epiphany-1ecd13da9865d272b02251f4c119ca7fe7113e64.tar.xz
gsoc2013-epiphany-1ecd13da9865d272b02251f4c119ca7fe7113e64.tar.zst
gsoc2013-epiphany-1ecd13da9865d272b02251f4c119ca7fe7113e64.zip
ephy-window: also open in new tab for ctrl+click.
svn path=/trunk/; revision=8664
Diffstat (limited to 'src')
-rw-r--r--src/ephy-window.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 08e3b595f..beac870ae 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -2518,12 +2518,16 @@ navigation_policy_decision_required_cb (WebKitWebView *web_view,
{
WebKitWebNavigationReason reason;
gint button;
+ gint state;
reason = webkit_web_navigation_action_get_reason (action);
button = webkit_web_navigation_action_get_button (action);
+ state = webkit_web_navigation_action_get_modifier_state (action);
+ /* Open in new tab for middle click or ctrl+click */
if (reason == WEBKIT_WEB_NAVIGATION_REASON_LINK_CLICKED &&
- button == 2 /* middle button */) {
+ (button == 2 /* middle button */ ||
+ (button == 1 && state == GDK_CONTROL_MASK) /* ctrl + left button */)) {
const char *uri;
EphyEmbed *embed;