Jacek Caban : user32: Allow creating windows using null driver for invisible winstations.
Alexandre Julliard
julliard at winehq.org
Thu Feb 9 15:54:27 CST 2017
Module: wine
Branch: master
Commit: af4294a9af1b5b9f9ee7f3fa7561b6ade6e5ac05
URL: http://source.winehq.org/git/wine.git/?a=commit;h=af4294a9af1b5b9f9ee7f3fa7561b6ade6e5ac05
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Feb 9 15:12:58 2017 +0100
user32: Allow creating windows using null driver for invisible winstations.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/driver.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c
index c4cbb8a..d59a2ea 100644
--- a/dlls/user32/driver.c
+++ b/dlls/user32/driver.c
@@ -39,6 +39,8 @@ static USER_DRIVER null_driver, lazy_load_driver;
const USER_DRIVER *USER_Driver = &lazy_load_driver;
static char driver_load_error[80];
+static BOOL CDECL nodrv_CreateWindow( HWND hwnd );
+
static HMODULE load_desktop_driver( HWND hwnd )
{
static const WCHAR display_device_guid_propW[] = {
@@ -152,6 +154,16 @@ static const USER_DRIVER *load_driver(void)
GET_USER_FUNC(ThreadDetach);
#undef GET_USER_FUNC
}
+ else
+ {
+ USEROBJECTFLAGS flags;
+ HWINSTA winstation;
+
+ winstation = GetProcessWindowStation();
+ if (!GetUserObjectInformationA(winstation, UOI_FLAGS, &flags, sizeof(flags), NULL)
+ || (flags.dwFlags & WSF_VISIBLE))
+ driver->pCreateWindow = nodrv_CreateWindow;
+ }
prev = InterlockedCompareExchangePointer( (void **)&USER_Driver, driver, &lazy_load_driver );
if (prev != &lazy_load_driver)
@@ -360,7 +372,7 @@ static BOOL CDECL nulldrv_CreateDesktopWindow( HWND hwnd )
return TRUE;
}
-static BOOL CDECL nulldrv_CreateWindow( HWND hwnd )
+static BOOL CDECL nodrv_CreateWindow( HWND hwnd )
{
static int warned;
HWND parent = GetAncestor( hwnd, GA_PARENT );
@@ -374,6 +386,11 @@ static BOOL CDECL nulldrv_CreateWindow( HWND hwnd )
return FALSE;
}
+static BOOL CDECL nulldrv_CreateWindow( HWND hwnd )
+{
+ return TRUE;
+}
+
static void CDECL nulldrv_DestroyWindow( HWND hwnd )
{
}
More information about the wine-cvs
mailing list