shell-global: Use MetaLaunchContext instead of GdkLaunchContext
Is functionally the same, without requiring the MetaX11Display.
This commit is contained in:
parent
f6da36ad3a
commit
b597d5faf0
@ -1382,24 +1382,26 @@ shell_global_create_app_launch_context (ShellGlobal *global,
|
|||||||
guint32 timestamp,
|
guint32 timestamp,
|
||||||
int workspace)
|
int workspace)
|
||||||
{
|
{
|
||||||
GdkAppLaunchContext *context;
|
MetaWorkspaceManager *workspace_manager = global->workspace_manager;
|
||||||
|
MetaStartupNotification *sn;
|
||||||
|
MetaLaunchContext *context;
|
||||||
|
MetaWorkspace *ws = NULL;
|
||||||
|
|
||||||
context = gdk_display_get_app_launch_context (global->gdk_display);
|
sn = meta_display_get_startup_notification (global->meta_display);
|
||||||
|
context = meta_startup_notification_create_launcher (sn);
|
||||||
|
|
||||||
if (timestamp == 0)
|
if (timestamp == 0)
|
||||||
timestamp = shell_global_get_current_time (global);
|
timestamp = shell_global_get_current_time (global);
|
||||||
gdk_app_launch_context_set_timestamp (context, timestamp);
|
meta_launch_context_set_timestamp (context, timestamp);
|
||||||
|
|
||||||
if (workspace < 0)
|
if (workspace < 0)
|
||||||
{
|
ws = meta_workspace_manager_get_active_workspace (workspace_manager);
|
||||||
MetaWorkspaceManager *workspace_manager = global->workspace_manager;
|
else
|
||||||
|
ws = meta_workspace_manager_get_workspace_by_index (workspace_manager, workspace);
|
||||||
|
|
||||||
workspace =
|
meta_launch_context_set_workspace (context, ws);
|
||||||
meta_workspace_manager_get_active_workspace_index (workspace_manager);
|
|
||||||
}
|
|
||||||
gdk_app_launch_context_set_desktop (context, workspace);
|
|
||||||
|
|
||||||
return (GAppLaunchContext *)context;
|
return (GAppLaunchContext *) context;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
Loading…
Reference in New Issue
Block a user