Signed-off-by: Huw Davies huw@codeweavers.com --- dlls/user32/user_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/user32/user_main.c b/dlls/user32/user_main.c index 31a6168108c..9e45835e3a9 100644 --- a/dlls/user32/user_main.c +++ b/dlls/user32/user_main.c @@ -175,12 +175,12 @@ static const WCHAR *get_default_desktop(void) 'A','p','p','D','e','f','a','u','l','t','s',0}; static WCHAR buffer[MAX_PATH + ARRAY_SIZE(explorerW)]; WCHAR *p, *appname = buffer; - const WCHAR *ret = defaultW; + const WCHAR *ret = NULL; DWORD len; HKEY tmpkey, appkey;
len = (GetModuleFileNameW( 0, buffer, MAX_PATH )); - if (!len || len >= MAX_PATH) return ret; + if (!len || len >= MAX_PATH) return defaultW; if ((p = strrchrW( appname, '/' ))) appname = p + 1; if ((p = strrchrW( appname, '\' ))) appname = p + 1; p = appname + strlenW(appname); @@ -196,8 +196,7 @@ static const WCHAR *get_default_desktop(void) len = sizeof(buffer); if (!RegQueryValueExW( appkey, desktopW, 0, NULL, (LPBYTE)buffer, &len )) ret = buffer; RegCloseKey( appkey ); - if (ret && strcmpiW( ret, defaultW )) return ret; - ret = defaultW; + if (ret) return ret; } }
@@ -210,8 +209,9 @@ static const WCHAR *get_default_desktop(void) len = sizeof(buffer); if (!RegQueryValueExW( appkey, desktopW, 0, NULL, (LPBYTE)buffer, &len )) ret = buffer; RegCloseKey( appkey ); + if (ret) return ret; } - return ret; + return defaultW; }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=74089
Your paranoid android.
=== debiant (32 bit Chinese:China report) ===
user32: clipboard.c:1168: Test failed: OpenClipboard failed: 5 clipboard.c:1170: Test failed: EmptyClipboard failed: 1418 clipboard.c:1172: Test failed: CloseClipboard failed: 1418 clipboard.c:1174: Test failed: sequence diff 0 clipboard.c:1017: Test failed: wait failed clipboard.c:1174: Test failed: WM_DRAWCLIPBOARD not received clipboard.c:1174: Test failed: WM_CLIPBOARDUPDATE not received clipboard.c:1199: Test failed: WM_DESTROYCLIPBOARD received