From 9d622b6b42d28464eef9066b9a39b7d85b2e9c56 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Wed, 27 Sep 2017 21:43:34 -0400 Subject: MqTab: Split event type and button conditions --- (limited to 'src') diff --git a/src/tab.c b/src/tab.c index f1ef600..8ba6f0c 100644 --- a/src/tab.c +++ b/src/tab.c @@ -241,12 +241,15 @@ create_tab_popover(GtkWidget *widget, MqTab *tab) static gboolean tab_label_button_press_cb(GtkWidget *widget, GdkEvent *event, MqTab *tab) { - /* Make sure this is a right mouse button press event. */ - if (event->type != GDK_BUTTON_PRESS || event->button.button != 3) { + /* Make sure this is a mouse button press event. */ + if (event->type != GDK_BUTTON_PRESS) { return FALSE; } - create_tab_popover(widget, tab); + /* Create a popover menu on right click. */ + if (event->button.button == 3) { + create_tab_popover(widget, tab); + } return FALSE; } -- cgit v0.9.1