Author: fireball Date: Tue Jul 28 15:11:22 2009 New Revision: 42266
URL: http://svn.reactos.org/svn/reactos?rev=42266&view=rev Log: - Make desktop window occupy whole primary surface (as usual, dimensions are hacked to 800x600 with a corresponding // FIXME:) if it's size is set to 0x0 at creation time. This fixes a number of window drawing problems, particularly arwinss issue nr. 5.
Modified: branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c
Modified: branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winent... ============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c [iso-8859-1] Tue Jul 28 15:11:22 2009 @@ -20,6 +20,7 @@ #include <ndk/ntndk.h> #include "ntrosgdi.h" #include "winent.h" +#include "wine/server.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(rosuserdrv); @@ -281,7 +282,37 @@
BOOL CDECL RosDrv_CreateDesktopWindow( HWND hwnd ) { - WARN("RosDrv_CreateDesktopWindow(%x)\n", hwnd); + unsigned int width, height; + + /* retrieve the real size of the desktop */ + SERVER_START_REQ( get_window_rectangles ) + { + req->handle = wine_server_user_handle( hwnd ); + wine_server_call( req ); + width = reply->window.right - reply->window.left; + height = reply->window.bottom - reply->window.top; + } + SERVER_END_REQ; + + TRACE("RosDrv_CreateDesktopWindow(%x), w %d h %d\n", hwnd, width, height); + + if (!width && !height) /* not initialized yet */ + { + SERVER_START_REQ( set_window_pos ) + { + req->handle = wine_server_user_handle( hwnd ); + req->previous = 0; + req->flags = SWP_NOZORDER; + req->window.left = 0; + req->window.top = 0; + req->window.right = 800; // FIXME: Use primary surface's dimensions! + req->window.bottom = 600; + req->client = req->window; + wine_server_call( req ); + } + SERVER_END_REQ; + } + return TRUE; }