summaryrefslogtreecommitdiff
path: root/applets/notification_area
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2017-10-14 00:15:32 -0400
committerraveit65 <[email protected]>2017-11-07 21:38:38 +0100
commitaf2fe7cf8f5678737060f96616ebc8a5ccf34f1e (patch)
tree8ad32da9de7573742ae00296b70f62d2b607864d /applets/notification_area
parent8b004f3ade0f2976bc52e8dc3f7f464f0614ad0e (diff)
downloadmate-panel-af2fe7cf8f5678737060f96616ebc8a5ccf34f1e.tar.bz2
mate-panel-af2fe7cf8f5678737060f96616ebc8a5ccf34f1e.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')
-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 728e739d..5a523d55 100644
--- a/applets/notification_area/status-notifier/sn-item.c
+++ b/applets/notification_area/status-notifier/sn-item.c
@@ -302,6 +302,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;