From 917fcb76d14e69642df38393bc2f6a5b52d0c7ed Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Thu, 6 Apr 2017 15:48:27 +0200 Subject: system-tray: Properly propagate orientation changes This fixes menu positioning on some system tray items when the panel orientation changed since it was initially started. --- applets/notification_area/na-box.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'applets/notification_area') diff --git a/applets/notification_area/na-box.c b/applets/notification_area/na-box.c index d1c7982a..db9a26e4 100644 --- a/applets/notification_area/na-box.c +++ b/applets/notification_area/na-box.c @@ -243,14 +243,19 @@ na_box_realize (GtkWidget *widget) NaBox *self = NA_BOX (widget); GdkScreen *screen; GtkOrientation orientation; + NaHost *tray_host; GTK_WIDGET_CLASS (na_box_parent_class)->realize (widget); /* Instantiate the hosts now we have a screen */ screen = gtk_widget_get_screen (GTK_WIDGET (self)); orientation = gtk_orientable_get_orientation (GTK_ORIENTABLE (self)); + tray_host = na_tray_new_for_screen (screen, orientation); + g_object_bind_property (self, "orientation", + tray_host, "orientation", + G_BINDING_DEFAULT); - add_host (self, na_tray_new_for_screen (screen, orientation)); + add_host (self, tray_host); add_host (self, sn_host_v0_new ()); } -- cgit v1.2.1