Alexandre Julliard : user32: Return reasonable values in GetWindowPlacement for the desktop window.

Alexandre Julliard julliard at winehq.org
Fri May 23 05:45:35 CDT 2008


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu May 22 17:04:22 2008 +0200

user32: Return reasonable values in GetWindowPlacement for the desktop window.

---

 dlls/user32/winpos.c |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index 916cac5..621f89a 100644
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -1172,7 +1172,20 @@ BOOL WINAPI GetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *wndpl )
 {
     WND *pWnd = WIN_GetPtr( hwnd );
 
-    if (!pWnd || pWnd == WND_DESKTOP) return FALSE;
+    if (!pWnd) return FALSE;
+
+    if (pWnd == WND_DESKTOP)
+    {
+        wndpl->length  = sizeof(*wndpl);
+        wndpl->showCmd = SW_SHOWNORMAL;
+        wndpl->flags = 0;
+        wndpl->ptMinPosition.x = -1;
+        wndpl->ptMinPosition.y = -1;
+        wndpl->ptMaxPosition.x = -1;
+        wndpl->ptMaxPosition.y = -1;
+        GetWindowRect( hwnd, &wndpl->rcNormalPosition );
+        return TRUE;
+    }
     if (pWnd == WND_OTHER_PROCESS)
     {
         if (IsWindow( hwnd )) FIXME( "not supported on other process window %p\n", hwnd );




More information about the wine-cvs mailing list