wined3d: CreateDevice should use the root window.
Jan Zerebecki
jan.wine at zerebecki.de
Tue Apr 4 10:37:01 CDT 2006
If this patch is rejected from inclusion, please tell me why, as i would have to
ask anyway.
This was already fixed in the old d3d8 code.
From: Jan Zerebecki <jan.wine at zerebecki.de>
Changelog:
wined3d: CreateDevice should use the root window.
Because only the root has __wine_x11_whole_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 51df0db..57e2cfa 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-patches
mailing list