From c8240fd86272a628ef20e6947dde0f53620f33e5 Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Mon, 12 Dec 2011 22:32:01 +0000 Subject: use gtk_status_icon_position_menu when right clicking a GtkStatusIcon. This positions it correctly, as I notice on GNOME3 (not on XFCE or Ubuntu with libappindicator) the top can be obscured, depending where on the icon you click. --- src/trg-main-window.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/trg-main-window.c b/src/trg-main-window.c index 92680a1..8c93c7c 100644 --- a/src/trg-main-window.c +++ b/src/trg-main-window.c @@ -1656,9 +1656,9 @@ static gboolean status_icon_button_press_event(GtkStatusIcon * icon, { if (event->type == GDK_BUTTON_PRESS && event->button == 3) { TrgMainWindowPrivate *priv = TRG_MAIN_WINDOW_GET_PRIVATE(data); - gtk_menu_popup(priv->iconMenu, NULL, NULL, NULL, NULL, - (event != NULL) ? event->button : 0, - gdk_event_get_time((GdkEvent *) event)); + gtk_menu_popup(priv->iconMenu, NULL, NULL, + gtk_status_icon_position_menu, priv->statusIcon, event->button, + gdk_event_get_time((GdkEvent *) event)); return TRUE; } else { return FALSE; -- cgit v1.2.3