Signed-off-by: Huw Davies huw@codeweavers.com --- dlls/user32/user_main.c | 5 +++-- programs/explorer/desktop.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/user32/user_main.c b/dlls/user32/user_main.c index d5ac03fa5fb..6ec37482d45 100644 --- a/dlls/user32/user_main.c +++ b/dlls/user32/user_main.c @@ -196,7 +196,8 @@ 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; + if (ret && *ret) return ret; + ret = NULL; } }
@@ -209,7 +210,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) return ret; + if (ret && *ret) return ret; } return defaultW; } diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index e7acb2db772..691db5c8bda 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -732,7 +732,7 @@ static const WCHAR *get_default_desktop_name(void) /* @@ Wine registry key: HKCU\Software\Wine\Explorer */ if (!RegOpenKeyW( HKEY_CURRENT_USER, explorer_keyW, &hkey )) { - if (!RegQueryValueExW( hkey, desktopW, 0, NULL, (LPBYTE)buffer, &size )) ret = buffer; + if (!RegQueryValueExW( hkey, desktopW, 0, NULL, (LPBYTE)buffer, &size ) && *buffer) ret = buffer; RegCloseKey( hkey ); } return ret; @@ -974,7 +974,7 @@ void manage_desktop( WCHAR *arg )
/* parse the desktop option */ /* the option is of the form /desktop=name[,widthxheight[,driver]] */ - if (*arg == '=' || *arg == ',') + if ((arg[0] == '=' || arg[0] == ',') && arg[1] && arg[1] != ',') { arg++; name = arg;
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=74079
Your paranoid android.
=== debiant (32 bit WoW report) ===
user32: win.c:10166: Test failed: Expected foreground window 000D0120, got 00E300D4 win.c:10168: Test failed: GetActiveWindow() = 00000000 win.c:10168: Test failed: GetFocus() = 00000000 win.c:10169: Test failed: Received WM_ACTIVATEAPP(1), did not expect it. win.c:10170: Test failed: Received WM_ACTIVATEAPP(0), did not expect it. win.c:10178: Test failed: Expected foreground window 000D0120, got 00000000 win.c:10180: Test failed: GetActiveWindow() = 00000000 win.c:10180: Test failed: GetFocus() = 00000000 win.c:10188: Test failed: Received WM_ACTIVATEAPP(1), did not expect it.
=== debiant (64 bit WoW report) ===
user32: clipboard.c:760: Test failed: 0: gle 5 clipboard.c:765: Test failed: 0.0: got 0000 instead of 0001 clipboard.c:805: Test failed: 0: gle 1418 clipboard.c:815: Test failed: 0: count 4 clipboard.c:818: Test failed: 0: gle 1418 clipboard.c:833: Test failed: 0: gle 5 clipboard.c:838: Test failed: 0.0: got 0000 instead of 0001 clipboard.c:868: Test failed: 0: gle 1418 clipboard.c:717: Test failed: 1: gle 5 clipboard.c:719: Test failed: 1: gle 1418 clipboard.c:746: Test failed: 1: count 4 clipboard.c:749: Test failed: 1: gle 1418 clipboard.c:765: Test failed: 1.0: got 0001 instead of 0007 win.c:10143: Test failed: Expected foreground window 0, got 00E300D4 win.c:10149: Test failed: Expected foreground window 000D0120, got 00E300D4