summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-27 21:43:34 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-27 21:43:34 (EDT)
commit9d622b6b42d28464eef9066b9a39b7d85b2e9c56 (patch)
treec036c9d454984375794be8ec5c4af0f6c5a3192c /src
parent9f5232732784a299f5586fb7b275210ca8473388 (diff)
downloadmarquee-9d622b6b42d28464eef9066b9a39b7d85b2e9c56.zip
marquee-9d622b6b42d28464eef9066b9a39b7d85b2e9c56.tar.gz
marquee-9d622b6b42d28464eef9066b9a39b7d85b2e9c56.tar.bz2
MqTab: Split event type and button conditions
Diffstat (limited to 'src')
-rw-r--r--src/tab.c9
1 files changed, 6 insertions, 3 deletions
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;
}