summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColomban Wendling <[email protected]>2017-04-06 15:48:27 +0200
committermonsta <[email protected]>2017-04-10 12:20:05 +0300
commit6f4f6e5a31495f12e38fef46d84be4b6311ef390 (patch)
treed2605090afc799daaf0b9d055006431d1e04070f
parent43451505f2ab8802b7c1e7a445bf9d9f070e9e70 (diff)
downloadmate-panel-6f4f6e5a31495f12e38fef46d84be4b6311ef390.tar.bz2
mate-panel-6f4f6e5a31495f12e38fef46d84be4b6311ef390.tar.xz
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.
-rw-r--r--applets/notification_area/na-box.c7
1 files changed, 6 insertions, 1 deletions
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 ());
}