diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-09-27 21:43:34 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-09-27 21:43:34 (EDT) |
commit | 9d622b6b42d28464eef9066b9a39b7d85b2e9c56 (patch) | |
tree | c036c9d454984375794be8ec5c4af0f6c5a3192c /src | |
parent | 9f5232732784a299f5586fb7b275210ca8473388 (diff) | |
download | marquee-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.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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; } |