d3d8: CreateDevice should use the root of the current window
Jan Zerebecki
jan.wine at zerebecki.de
Mon Jan 30 06:21:23 CST 2006
If this patch is rejected from inclusion, please tell me why, as i would have to
ask anyway.
From: Jan Zerebecki <jan.wine at zerebecki.de>
Changelog:
d3d8: CreateDevice should use the root of the current window
because if it's not the root, it doesn't have the property
__wine_x11_whole_window .
Fixes bug #4341 .
---
dlls/d3d8/directx.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c
index a324855..1c5ce59 100644
--- a/dlls/d3d8/directx.c
+++ b/dlls/d3d8/directx.c
@@ -713,8 +713,12 @@ HRESULT WINAPI IDirect3D8Impl_CreateDe
if (!whichHWND) {
whichHWND = hFocusWindow;
}
+ whichHWND = GetAncestor(whichHWND, GA_ROOT);
+ if ( !( object->win = (Window)GetPropA(whichHWND, "__wine_x11_whole_window") ) ) {
+ ERR("Can't get drawable (window), HWND:%p doesn't have the property __wine_x11_whole_window\n", whichHWND);
+ return D3DERR_NOTAVAILABLE;
+ }
object->win_handle = whichHWND;
- object->win = (Window)GetPropA( whichHWND, "__wine_x11_whole_window" );
hDc = GetDC(whichHWND);
object->display = get_display(hDc);
More information about the wine-patches
mailing list