summaryrefslogtreecommitdiff
path: root/0002-wayland-Set-startup-ID-from-GApplication-platform-da.patch
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2016-11-08 13:37:12 -0500
committerMatthias Clasen <mclasen@redhat.com>2016-11-08 13:37:12 -0500
commit3f1dd6f226c7d446d7b1330341bff91f880dc29b (patch)
tree64b0b7ce1c7bc8f06e1fb1ff3504621547fdbf35 /0002-wayland-Set-startup-ID-from-GApplication-platform-da.patch
parentUpdate to 3.22.2 (diff)
downloadgtk3-classic-build-gtk3-3f1dd6f226c7d446d7b1330341bff91f880dc29b.tar.gz
gtk3-classic-build-gtk3-3f1dd6f226c7d446d7b1330341bff91f880dc29b.tar.bz2
gtk3-classic-build-gtk3-3f1dd6f226c7d446d7b1330341bff91f880dc29b.zip
Fix 1376471
Diffstat (limited to '0002-wayland-Set-startup-ID-from-GApplication-platform-da.patch')
-rw-r--r--0002-wayland-Set-startup-ID-from-GApplication-platform-da.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/0002-wayland-Set-startup-ID-from-GApplication-platform-da.patch b/0002-wayland-Set-startup-ID-from-GApplication-platform-da.patch
new file mode 100644
index 0000000..9001efe
--- /dev/null
+++ b/0002-wayland-Set-startup-ID-from-GApplication-platform-da.patch
@@ -0,0 +1,48 @@
+From 0bccddb2ffecd19eae74c8a053cac1b80353b197 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
+Date: Mon, 10 Oct 2016 12:33:54 +0200
+Subject: [PATCH 2/2] wayland: Set startup ID from GApplication platform data
+
+The GApplication platform data may contain a startup ID that on X11
+is used to set the startup notification ID when activated. Do the
+same on the wayland backend to make startup notifications work for
+DBus-activated applications where the DESKTOP_STARTUP_ID environment
+variable is not set.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=768531
+---
+ gtk/gtkapplication-wayland.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/gtk/gtkapplication-wayland.c b/gtk/gtkapplication-wayland.c
+index 84df82c..221a1ad 100644
+--- a/gtk/gtkapplication-wayland.c
++++ b/gtk/gtkapplication-wayland.c
+@@ -61,6 +61,17 @@ gtk_application_impl_wayland_handle_window_realize (GtkApplicationImpl *impl,
+ }
+
+ static void
++gtk_application_impl_wayland_before_emit (GtkApplicationImpl *impl,
++ GVariant *platform_data)
++{
++ const char *startup_notification_id = NULL;
++
++ g_variant_lookup (platform_data, "desktop-startup-id", "&s", &startup_notification_id);
++
++ gdk_wayland_display_set_startup_notification_id (gdk_display_get_default (), startup_notification_id);
++}
++
++static void
+ gtk_application_impl_wayland_init (GtkApplicationImplWayland *wayland)
+ {
+ }
+@@ -72,4 +83,6 @@ gtk_application_impl_wayland_class_init (GtkApplicationImplWaylandClass *class)
+
+ impl_class->handle_window_realize =
+ gtk_application_impl_wayland_handle_window_realize;
++ impl_class->before_emit =
++ gtk_application_impl_wayland_before_emit;
+ }
+--
+2.9.3
+
bgstack15