[gtk+] wayland: Set startup ID from GApplication platform data
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Set startup ID from GApplication platform data
- Date: Wed, 9 Nov 2016 19:39:07 +0000 (UTC)
commit 38a8e4ee7c0fccff55c5fee156340ccd2c8d83bd
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Oct 10 12:33:54 2016 +0200
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 files changed, 13 insertions(+), 0 deletions(-)
---
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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]