mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
main: Use setenv()
This commit is contained in:
parent
183ad75603
commit
66c4555dc7
@ -28,7 +28,6 @@
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#define _SVID_SOURCE /* for putenv() */
|
||||
|
||||
#include <config.h>
|
||||
#include "keybindings-private.h"
|
||||
|
@ -347,14 +347,10 @@ meta_clutter_init (void)
|
||||
static void
|
||||
meta_select_display (gchar *display_name)
|
||||
{
|
||||
gchar *envVar = "";
|
||||
if (display_name)
|
||||
envVar = g_strconcat ("DISPLAY=", display_name, NULL);
|
||||
else if (g_getenv ("MUTTER_DISPLAY"))
|
||||
envVar = g_strconcat ("DISPLAY=",
|
||||
g_getenv ("MUTTER_DISPLAY"), NULL);
|
||||
/* DO NOT FREE envVar, putenv() sucks */
|
||||
putenv (envVar);
|
||||
if (!display_name)
|
||||
display_name = g_getenv ("MUTTER_DISPLAY");
|
||||
|
||||
g_setenv ("DISPLAY", display_name, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user