From 1ecd13da9865d272b02251f4c119ca7fe7113e64 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Sun, 4 Jan 2009 14:46:33 +0000 Subject: ephy-window: also open in new tab for ctrl+click. svn path=/trunk/; revision=8664 --- src/ephy-window.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3