core: Add MetaLaunchContext
This is a GAppLaunchContext subclass meant to replace usage of GdkAppLaunchContext in gnome-shell. Launch contexts get created from the MetaStartupNotification as they are closely related. The messaging underneath depends on the availability of a X11 display, if there is one we go through it (and libsn). If there is none, we still create startup sequences manually for wayland clients.
This commit is contained in:

committed by
Jonas Ådahl

parent
ca67d52cac
commit
f033d0e846
@ -631,3 +631,21 @@ meta_startup_notification_get_sequences (MetaStartupNotification *sn)
|
||||
{
|
||||
return sn->startup_sequences;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_startup_notification_create_launcher:
|
||||
* @sn: a #MetaStartupNotification
|
||||
*
|
||||
* Creates an app launch context.
|
||||
*
|
||||
* Returns: (transfer full): a launch context.
|
||||
**/
|
||||
MetaLaunchContext *
|
||||
meta_startup_notification_create_launcher (MetaStartupNotification *sn)
|
||||
{
|
||||
MetaDisplay *display = sn->display;
|
||||
|
||||
return g_object_new (META_TYPE_LAUNCH_CONTEXT,
|
||||
"display", sn->display,
|
||||
NULL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user