Jan Zerebecki : wined3d: CreateDevice should use the root window.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Apr 4 16:15:39 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: d4fa4f22cbb5912fd40c2b967e9d189ef05d1fb8
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=d4fa4f22cbb5912fd40c2b967e9d189ef05d1fb8
Author: Jan Zerebecki <jan.wine at zerebecki.de>
Date: Tue Apr 4 17:37:01 2006 +0200
wined3d: CreateDevice should use the root window.
---
dlls/wined3d/device.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index f355499..24409ea 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1193,7 +1193,11 @@ HRESULT WINAPI IWineD3DDeviceImpl_Create
object->win_handle = This->createParms.hFocusWindow;
}
- object->win = (Window)GetPropA(object->win_handle, "__wine_x11_whole_window" );
+ object->win_handle = GetAncestor(object->win_handle, GA_ROOT);
+ if ( !( object->win = (Window)GetPropA(object->win_handle, "__wine_x11_whole_window") ) ) {
+ ERR("Can't get drawable (window), HWND:%p doesn't have the property __wine_x11_whole_window\n", object->win_handle);
+ return D3DERR_NOTAVAILABLE;
+ }
hDc = GetDC(object->win_handle);
object->display = get_display(hDc);
ReleaseDC(object->win_handle, hDc);
More information about the wine-cvs
mailing list