mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
GAppInfo: overwrite the DISPLAY only if it is set in the launch context
If the launch context is a GAppLaunchContext, and not a
GdkAppLaunchContext, then g_app_launch_context_get_display will return
NULL because the get_display virtual method is undefined. The DISPLAY
might still be inherited from the parent process, in which case
overwriting it with NULL breaks the launch.
This is a regression introduced in:
de834bed30
Fixes: https://bugzilla.gnome.org/672786
This commit is contained in:
parent
6219767f61
commit
3f816dc5d1
@ -1309,7 +1309,8 @@ _g_desktop_app_info_launch_uris_internal (GAppInfo *appinfo,
|
|||||||
display = g_app_launch_context_get_display (launch_context,
|
display = g_app_launch_context_get_display (launch_context,
|
||||||
appinfo,
|
appinfo,
|
||||||
launched_files);
|
launched_files);
|
||||||
envp = g_environ_setenv (envp, "DISPLAY", display, TRUE);
|
if (display)
|
||||||
|
envp = g_environ_setenv (envp, "DISPLAY", display, TRUE);
|
||||||
|
|
||||||
if (info->startup_notify)
|
if (info->startup_notify)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user