From fe8ab024afa7cda3c63e77973dff51c3cc5e153a Mon Sep 17 00:00:00 2001 From: Ralf Hoffmann Date: Fri, 4 Dec 2009 14:57:01 +0100 Subject: [PATCH] fixed wrong env setup when setting background This patch fixes a problem with restarting Window Maker in multi-screen environments. The code for setting the background by calling wmsetbg changes the environment. In multi-screen setups the DISPLAY variable becomes :0.0 instead of :0 (for example). The restarted Window Maker process therefore only manages one screen. --- src/defaults.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/defaults.c b/src/defaults.c index 6796309a..3611a7df 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -2988,7 +2988,6 @@ static int setWorkspaceBack(WScreen * scr, WDefaultEntry * entry, WMPropList * v char *dither; int len; - SetupEnvironment(scr); text = WMGetPropListDescription(value, False); len = strlen(text) + 40; command = wmalloc(len); @@ -2998,7 +2997,7 @@ static int setWorkspaceBack(WScreen * scr, WDefaultEntry * entry, WMPropList * v else snprintf(command, len, "wmsetbg %s -p '%s' &", dither, text); wfree(text); - system(command); + ExecuteShellCommand(scr, command); wfree(command); } WMReleasePropList(value);