From 6bde0393019b4997211c9716ceaa7230c2b0f7af29dcbda601ad0c8d2afee493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Thu, 3 Nov 2016 18:51:29 +0000 Subject: [PATCH] Accepting request 438131 from GNOME:Next 1 OBS-URL: https://build.opensuse.org/request/show/438131 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=215 --- mutter-fix-startup.patch | 46 ++++++++++++++++++++++++++++++++++++++++ mutter.changes | 6 ++++++ mutter.spec | 5 ++++- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 mutter-fix-startup.patch diff --git a/mutter-fix-startup.patch b/mutter-fix-startup.patch new file mode 100644 index 0000000..506978c --- /dev/null +++ b/mutter-fix-startup.patch @@ -0,0 +1,46 @@ +From 4ed430b4ef3013c96fa56cdc57b925b42d20ead9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Thu, 20 Oct 2016 18:00:04 +0200 +Subject: [PATCH] gtk-shell: Work around non-working startup notifications + +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. + +https://bugzilla.gnome.org/show_bug.cgi?id=768531 +--- + src/wayland/meta-wayland-gtk-shell.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/src/wayland/meta-wayland-gtk-shell.c b/src/wayland/meta-wayland-gtk-shell.c +index d6e249f..9d1a19e 100644 +--- a/src/wayland/meta-wayland-gtk-shell.c ++++ b/src/wayland/meta-wayland-gtk-shell.c +@@ -219,11 +219,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 +-- +2.9.3 + diff --git a/mutter.changes b/mutter.changes index 56d7812..ed786d9 100644 --- a/mutter.changes +++ b/mutter.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 1 10:09:57 UTC 2016 - zaitor@opensuse.org + +- Add mutter-fix-startup.patch: Fix slow startup notification for + some gtk3 apps when running on wayland (bgo#768531). + ------------------------------------------------------------------- Tue Oct 11 09:15:33 UTC 2016 - zaitor@opensuse.org diff --git a/mutter.spec b/mutter.spec index 5612d74..aeeec27 100644 --- a/mutter.spec +++ b/mutter.spec @@ -42,6 +42,8 @@ Patch3: mutter-bsc984738-grab-display.patch Patch4: mutter-screeenshot-coords.patch # PATCH-FIX-UPSTREAM mutter-scale-positioner-coordinates.patch bgo#771841 zaitor@opensuse.org -- wayland/xdg-shell: Scale positioner coordinates, fix hidpi menus. Patch5: mutter-scale-positioner-coordinates.patch +# PATCH-FIX-UPSTREAM mutter-fix-startup.patch bgo#768531 zaitor@opensuse.org -- Fix slow startup notification on wayland +Patch6: mutter-fix-startup.patch BuildRequires: fdupes BuildRequires: gobject-introspection-devel >= 0.9.5 BuildRequires: libSM-devel @@ -98,9 +100,9 @@ from Metacity. %package -n libmutter0 Summary: Window and compositing manager based on Clutter -- Library -Group: System/Libraries # we need the gsettings schema; hopefully, they'll stay backwards compatible # (since we can't require = version, to not break SLPP) +Group: System/Libraries Requires: %{name}-data >= %{version} %description -n libmutter0 @@ -143,6 +145,7 @@ translation-update-upstream %endif %patch4 -p1 %patch5 -p1 +%patch6 -p1 %build %configure \