From 42c22dccba296dae429a2bd60adfcba615308932 Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Sat, 14 Oct 2017 00:15:32 -0400 Subject: GTK 3.22 status notifier: reposition menu when size changes Also catch a missed instance of needing to reposition. This stops most cases of a bottom panel menu changing size and ending up too low. --- applets/notification_area/status-notifier/sn-dbus-menu.c | 2 ++ applets/notification_area/status-notifier/sn-item.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/applets/notification_area/status-notifier/sn-dbus-menu.c b/applets/notification_area/status-notifier/sn-dbus-menu.c index 50cca5ba..a9075bd6 100644 --- a/applets/notification_area/status-notifier/sn-dbus-menu.c +++ b/applets/notification_area/status-notifier/sn-dbus-menu.c @@ -179,6 +179,8 @@ get_layout_cb (GObject *source_object, g_hash_table_remove_all (menu->items); layout_parse (menu, layout, GTK_MENU (menu)); + /*Reposition to accomodate size change if necessary*/ + gtk_menu_reposition(GTK_MENU(menu)); g_variant_unref (layout); } diff --git a/applets/notification_area/status-notifier/sn-item.c b/applets/notification_area/status-notifier/sn-item.c index d62c7a30..3bba668a 100644 --- a/applets/notification_area/status-notifier/sn-item.c +++ b/applets/notification_area/status-notifier/sn-item.c @@ -313,6 +313,8 @@ sn_item_popup_menu (GtkWidget *widget) GDK_GRAVITY_SOUTH_WEST, GDK_GRAVITY_NORTH_WEST, NULL); + /*Fix positioning if size changed since last shown*/ + gtk_menu_reposition(priv->menu); #else guint button = 0; guint32 active_time = GDK_CURRENT_TIME; -- cgit v1.2.1