From 44cf8edd7f9cba101c934a2fa4ae704a5fa06ac8 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Thu, 10 Jun 2021 18:36:14 -0400 Subject: [PATCH] Control click to open link in new tab --- src/browser.c | 7 +++++-- 1 file 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; } -- 2.39.2