Blame SOURCES/startup-notification.patch

db633a
From 4ed430b4ef3013c96fa56cdc57b925b42d20ead9 Mon Sep 17 00:00:00 2001
db633a
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
db633a
Date: Thu, 20 Oct 2016 18:00:04 +0200
db633a
Subject: [PATCH] gtk-shell: Work around non-working startup notifications
db633a
db633a
GNOME Shell relies on the MetaScreen::startup-sequence-changed signal,
db633a
which is tied to (lib)startup-notification and therefore X11. As a result,
db633a
when we remove the startup sequence of a wayland client, GNOME Shell will
db633a
not be notified about this until startup-notification's timeout is hit.
db633a
As a temporary stop-gap, go through XWayland even for wayland clients,
db633a
so that the signal is emitted when expected.
db633a
db633a
https://bugzilla.gnome.org/show_bug.cgi?id=768531
db633a
---
db633a
 src/wayland/meta-wayland-gtk-shell.c | 10 ++++++++++
db633a
 1 file changed, 10 insertions(+)
db633a
db633a
diff --git a/src/wayland/meta-wayland-gtk-shell.c b/src/wayland/meta-wayland-gtk-shell.c
db633a
index d6e249f..9d1a19e 100644
db633a
--- a/src/wayland/meta-wayland-gtk-shell.c
db633a
+++ b/src/wayland/meta-wayland-gtk-shell.c
db633a
@@ -219,11 +219,21 @@ gtk_shell_set_startup_id (struct wl_client   *client,
db633a
                           struct wl_resource *resource,
db633a
                           const char         *startup_id)
db633a
 {
db633a
+#if 0
db633a
   MetaDisplay *display;
db633a
 
db633a
   display = meta_get_display ();
db633a
   meta_startup_notification_remove_sequence (display->startup_notification,
db633a
                                              startup_id);
db633a
+#else
db633a
+  /* HACK: MetaScreen::startup-sequence-changed is currently tied to
db633a
+           (lib)startup-notification, which means it only works on X11;
db633a
+           so for now, always go through XWayland, even for wayland clients */
db633a
+  gdk_x11_display_broadcast_startup_message (gdk_display_get_default (),
db633a
+                                             "remove",
db633a
+                                             "ID", startup_id,
db633a
+                                             NULL);
db633a
+#endif
db633a
 }
db633a
 
db633a
 static void
db633a
-- 
db633a
2.9.3