diff options
Diffstat (limited to 'libmdock/mdock-widget.c')
-rw-r--r-- | libmdock/mdock-widget.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/libmdock/mdock-widget.c b/libmdock/mdock-widget.c index 561a5b4..cd71999 100644 --- a/libmdock/mdock-widget.c +++ b/libmdock/mdock-widget.c @@ -218,18 +218,23 @@ static void handle_item_pinned_changed(MDockWidget *self, GParamSpec *spec, MDoc static gboolean handle_item_button_press(MDockWidget *self, GdkEventButton *event, MDockItem *item) { - if (self->priv->popup_timer) { - g_source_remove(self->priv->popup_timer); - self->priv->popup_timer = 0; - } - if (self->priv->current_popup_item) { - hide_item_popup(self); + if (event->button != 1) { + if (self->priv->popup_timer) { + g_source_remove(self->priv->popup_timer); + self->priv->popup_timer = 0; + } + if (self->priv->current_popup_item) { + hide_item_popup(self); + } } switch (event->button) { case 1: self->priv->primary_button_down = TRUE; break; + case 2: + return FALSE; // Let the panel handle a middle button press. + break; case 3: gtk_menu_popup(GTK_MENU(g_object_get_qdata(G_OBJECT(item), mdock_widget_item_menu_quark())), NULL, NULL, NULL, NULL, event->button, event->time); |