gtk-shell: Work around non-working startup notifications
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 20 Oct 2016 16:00:04 +0000 (18:00 +0200)
committerDidier Roche <didrocks@ubuntu.com>
Wed, 5 Sep 2018 10:30:26 +0000 (11:30 +0100)
GNOME Shell relies on the MetaScreen::startup-sequence-changed signal,
which is tied to (lib)startup-notification and therefore X11. As a result,
when we remove the startup sequence of a wayland client, GNOME Shell will
not be notified about this until startup-notification's timeout is hit.
As a temporary stop-gap, go through XWayland even for wayland clients,
so that the signal is emitted when expected.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=768531
Applied-upstream: no

Gbp-Pq: Name bgo768531_workaround-startup-notifications.patch

src/wayland/meta-wayland-gtk-shell.c

index 474595b188d47f5e73da4d0e9fb064e3cb2eee71..58375674ac521b7aa5aae3043fb839206eac266c 100644 (file)
@@ -321,11 +321,21 @@ gtk_shell_set_startup_id (struct wl_client   *client,
                           struct wl_resource *resource,
                           const char         *startup_id)
 {
+#if 0
   MetaDisplay *display;
 
   display = meta_get_display ();
   meta_startup_notification_remove_sequence (display->startup_notification,
                                              startup_id);
+#else
+  /* HACK: MetaScreen::startup-sequence-changed is currently tied to
+           (lib)startup-notification, which means it only works on X11;
+           so for now, always go through XWayland, even for wayland clients */
+  gdk_x11_display_broadcast_startup_message (gdk_display_get_default (),
+                                             "remove",
+                                             "ID", startup_id,
+                                             NULL);
+#endif
 }
 
 static void