d3d8: CreateDevice should try the root if the current window fails
[2nd try]
Jan Zerebecki
jan.wine at zerebecki.de
Wed Jan 25 05:31:27 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 try the root if the current window fails
because it doesn't have the property __wine_x11_whole_window .
Fixes bug #4341 .
---
dlls/d3d8/directx.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c
index a324855..b21e76d 100644
--- a/dlls/d3d8/directx.c
+++ b/dlls/d3d8/directx.c
@@ -714,7 +714,20 @@ HRESULT WINAPI IDirect3D8Impl_CreateDe
whichHWND = hFocusWindow;
}
object->win_handle = whichHWND;
- object->win = (Window)GetPropA( whichHWND, "__wine_x11_whole_window" );
+ if ( !( object->win = (Window)GetPropA(whichHWND, "__wine_x11_whole_window") ) )
+ {
+ whichHWND = GetAncestor(object->win_handle, GA_ROOT);
+ if ( !( object->win = (Window)GetPropA(whichHWND, "__wine_x11_whole_window") ) )
+ {
+ FIXME("neither HWND:%p nor it's root %p have the property __wine_x11_whole_window\n", object->win_handle, whichHWND);
+ whichHWND = object->win_handle;
+ }
+ else
+ {
+ TRACE("HWND:%p doesn't have __wine_x11_whole_window, used root %p\n", object->win_handle, whichHWND);
+ object->win_handle = whichHWND;
+ }
+ }
hDc = GetDC(whichHWND);
object->display = get_display(hDc);
More information about the wine-patches
mailing list