diff options
author | Luke from DC <[email protected]> | 2023-06-15 18:30:56 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2023-06-15 18:30:56 +0000 |
commit | e61dad01e852d7913f4c9b3dae508088e3e7b287 (patch) | |
tree | 84712c763091a6890b8048468dcf8a399bb20ef3 /applets/notification_area/na-grid.c | |
parent | 4350e7e839ec1ecd2eb063a2e250b843162ee418 (diff) | |
download | mate-panel-e61dad01e852d7913f4c9b3dae508088e3e7b287.tar.bz2 mate-panel-e61dad01e852d7913f4c9b3dae508088e3e7b287.tar.xz |
Wayland, Tray applet: allow in-process applet to load, using SNI only (#1372)
*We cannot load the legacy system tray in Wayland as that requires xembed.
*We CAN load the status-notifier (SNI support)
*Wayland needs us to explicitly set gtk_button_set_always_show_image to TRUE
*Wayland needs us to explicitly set gtk_image_menu_item_set_always_show_image to TRUE
Diffstat (limited to 'applets/notification_area/na-grid.c')
-rw-r--r-- | applets/notification_area/na-grid.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/applets/notification_area/na-grid.c b/applets/notification_area/na-grid.c index b7690c3c..9698be6c 100644 --- a/applets/notification_area/na-grid.c +++ b/applets/notification_area/na-grid.c @@ -316,22 +316,26 @@ na_grid_realize (GtkWidget *widget) { NaGrid *self = NA_GRID (widget); GdkScreen *screen; + GdkDisplay *display; GtkOrientation orientation; NaHost *tray_host; GSettings *settings; GTK_WIDGET_CLASS (na_grid_parent_class)->realize (widget); + display = gdk_display_get_default (); /* 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", + if (GDK_IS_X11_DISPLAY (display)) + { + 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, tray_host); - + add_host (self, tray_host); + } settings = g_settings_new ("org.mate.panel"); if (g_settings_get_boolean (settings, "enable-sni-support")) add_host (self, sn_host_v0_new ()); |