summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmaan Bhojwani <me@armaanb.net>2021-06-10 18:36:14 -0400
committerArmaan Bhojwani <me@armaanb.net>2021-06-10 18:36:14 -0400
commit44cf8edd7f9cba101c934a2fa4ae704a5fa06ac8 (patch)
tree4a561a37abc8e1256db4da067f59f30009fcb1ec
parent9965aeb5f64ea23c6c4bf78ef956e165b7c3d762 (diff)
downloadchorizo-44cf8edd7f9cba101c934a2fa4ae704a5fa06ac8.tar.gz
Control click to open link in new tab
-rw-r--r--src/browser.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/browser.c b/src/browser.c
index 5054241..e1dd0c4 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -1121,9 +1121,12 @@ key_web_view(GtkWidget *widget, GdkEvent *event, gpointer data) {
gtk_entry_set_progress_fraction(GTK_ENTRY(c->location), 0);
}
} else if (event->type == GDK_BUTTON_RELEASE) {
+ GdkModifierType modifiers = gtk_accelerator_get_default_mod_mask();
switch (((GdkEventButton *)event)->button) {
- case 2:
- if (c->hover_uri != NULL) {
+ case 1:
+ if ((((GdkEventButton *)event)->state & modifiers) ==
+ GDK_CONTROL_MASK &&
+ c->hover_uri != NULL) {
client_new(c->hover_uri, NULL, TRUE, FALSE);
return TRUE;
}