Vincent Povirk : explorer: Default to showing the systray if the desktop is named "shell".

Alexandre Julliard julliard at winehq.org
Wed Jan 8 13:41:33 CST 2014


Module: wine
Branch: master
Commit: dfaf6a42acdcb83c50f232d1f262b4721d01bdcd
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=dfaf6a42acdcb83c50f232d1f262b4721d01bdcd

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Tue Jan  7 14:52:14 2014 -0600

explorer: Default to showing the systray if the desktop is named "shell".

---

 programs/explorer/desktop.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c
index 51791c7..db6a355 100644
--- a/programs/explorer/desktop.c
+++ b/programs/explorer/desktop.c
@@ -644,17 +644,22 @@ static BOOL get_default_enable_shell( const WCHAR *name )
                                          'E','x','p','l','o','r','e','r','\\',
                                          'D','e','s','k','t','o','p','s',0};
     static const WCHAR enable_shellW[] = {'E','n','a','b','l','e','S','h','e','l','l',0};
+    static const WCHAR shellW[] = {'s','h','e','l','l',0};
     HKEY hkey;
-    BOOL result = FALSE;
+    BOOL found = FALSE;
+    BOOL result;
     DWORD size = sizeof(result);
 
     /* @@ Wine registry key: HKCU\Software\Wine\Explorer\Desktops */
     if (!RegOpenKeyW( HKEY_CURRENT_USER, desktop_keyW, &hkey ))
     {
-        if (RegGetValueW( hkey, name, enable_shellW, RRF_RT_REG_DWORD, NULL, &result, &size ))
-            result = FALSE;
+        if (!RegGetValueW( hkey, name, enable_shellW, RRF_RT_REG_DWORD, NULL, &result, &size ))
+            found = TRUE;
         RegCloseKey( hkey );
     }
+    /* Default off, except for the magic desktop name "shell" */
+    if (!found)
+        result = (lstrcmpiW( name, shellW ) == 0);
     return result;
 }
 




More information about the wine-cvs mailing list