Commit 0d969b17 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winex11: Remove now unnecessary create_info HWND checks.

parent 8ba1b27f
......@@ -304,7 +304,7 @@ static VkResult X11DRV_vkCreateWin32SurfaceKHR(VkInstance instance,
FIXME("Support for allocation callbacks not implemented yet\n");
/* TODO: support child window rendering. */
if (create_info->hwnd && NtUserGetAncestor(create_info->hwnd, GA_PARENT) != NtUserGetDesktopWindow())
if (NtUserGetAncestor( create_info->hwnd, GA_PARENT ) != NtUserGetDesktopWindow())
{
FIXME("Application requires child window rendering, which is not implemented yet!\n");
return VK_ERROR_INCOMPATIBLE_DRIVER;
......@@ -316,15 +316,8 @@ static VkResult X11DRV_vkCreateWin32SurfaceKHR(VkInstance instance,
x11_surface->ref = 1;
x11_surface->hwnd = create_info->hwnd;
if (x11_surface->hwnd)
{
x11_surface->window = create_client_window(create_info->hwnd, &default_visual);
x11_surface->hwnd_thread_id = NtUserGetWindowThread(x11_surface->hwnd, NULL);
}
else
{
x11_surface->window = create_dummy_client_window();
}
x11_surface->window = create_client_window( create_info->hwnd, &default_visual );
x11_surface->hwnd_thread_id = NtUserGetWindowThread( x11_surface->hwnd, NULL );
if (!x11_surface->window)
{
......@@ -349,11 +342,9 @@ static VkResult X11DRV_vkCreateWin32SurfaceKHR(VkInstance instance,
}
pthread_mutex_lock(&vulkan_mutex);
if (x11_surface->hwnd)
{
wine_vk_surface_destroy( x11_surface->hwnd );
XSaveContext(gdi_display, (XID)create_info->hwnd, vulkan_hwnd_context, (char *)wine_vk_surface_grab(x11_surface));
}
wine_vk_surface_destroy( x11_surface->hwnd );
XSaveContext( gdi_display, (XID)create_info->hwnd, vulkan_hwnd_context,
(char *)wine_vk_surface_grab( x11_surface ) );
list_add_tail(&surface_list, &x11_surface->entry);
pthread_mutex_unlock(&vulkan_mutex);
......
......@@ -1588,24 +1588,6 @@ Window get_dummy_parent(void)
/**********************************************************************
* create_dummy_client_window
*/
Window create_dummy_client_window(void)
{
XSetWindowAttributes attr;
attr.colormap = default_colormap;
attr.bit_gravity = NorthWestGravity;
attr.win_gravity = NorthWestGravity;
attr.backing_store = NotUseful;
attr.border_pixel = 0;
return XCreateWindow( gdi_display, get_dummy_parent(), 0, 0, 1, 1, 0,
default_visual.depth, InputOutput, default_visual.visual,
CWBitGravity | CWWinGravity | CWBackingStore | CWColormap | CWBorderPixel, &attr );
}
/**********************************************************************
* create_client_window
*/
Window create_client_window( HWND hwnd, const XVisualInfo *visual )
......
......@@ -653,7 +653,6 @@ extern void update_user_time( Time time );
extern void read_net_wm_states( Display *display, struct x11drv_win_data *data );
extern void update_net_wm_states( struct x11drv_win_data *data );
extern void make_window_embedded( struct x11drv_win_data *data );
extern Window create_dummy_client_window(void);
extern Window create_client_window( HWND hwnd, const XVisualInfo *visual );
extern void set_window_visual( struct x11drv_win_data *data, const XVisualInfo *vis, BOOL use_alpha );
extern void change_systray_owner( Display *display, Window systray_window );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment