gdk/wayland: Set a startup notification
And notify the shell about it. This is done through the gtk_shell1.notify_launch request added in gtk-shell v3. All the plumbing on the way to the activated application is already in place to transfer the startup ID, so the other side just has to reply with gtk_surface1.request_focus. Closes: https://gitlab.gnome.org/GNOME/gtk/issues/624
This commit is contained in:
parent
ed9db5a173
commit
bff46d8696
@ -35,7 +35,20 @@ gdk_wayland_app_launch_context_get_startup_notify_id (GAppLaunchContext *context
|
||||
GAppInfo *info,
|
||||
GList *files)
|
||||
{
|
||||
return NULL;
|
||||
GdkWaylandDisplay *display;
|
||||
gchar *id = NULL;
|
||||
|
||||
g_object_get (context, "display", &display, NULL);
|
||||
|
||||
if (display->gtk_shell_version >= 3)
|
||||
{
|
||||
id = g_uuid_string_random ();
|
||||
gtk_shell1_notify_launch (display->gtk_shell, id);
|
||||
}
|
||||
|
||||
g_object_unref (display);
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user