summaryrefslogtreecommitdiff
path: root/applets/notification_area/status-notifier
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2017-10-14 00:15:32 -0400
committerlukefromdc <[email protected]>2017-10-14 00:29:07 -0400
commit42c22dccba296dae429a2bd60adfcba615308932 (patch)
treec5206209fc6d914341445011a5bdae66076dc788 /applets/notification_area/status-notifier
parentae740f3ffe10aff6505921f8b78a5ff90a94ab33 (diff)
downloadmate-panel-42c22dccba296dae429a2bd60adfcba615308932.tar.bz2
mate-panel-42c22dccba296dae429a2bd60adfcba615308932.tar.xz
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.
Diffstat (limited to 'applets/notification_area/status-notifier')
-rw-r--r--applets/notification_area/status-notifier/sn-dbus-menu.c2
-rw-r--r--applets/notification_area/status-notifier/sn-item.c2
2 files changed, 4 insertions, 0 deletions
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;