Commit e280527f authored by Alexandre Julliard's avatar Alexandre Julliard

winex11: Never attempt to create the window data from a different thread.

parent c540c98d
......@@ -1149,8 +1149,7 @@ static Window get_owner_whole_window( HWND owner, BOOL force_managed )
if (!(data = X11DRV_get_win_data( owner )))
{
if (GetWindowThreadProcessId( owner, NULL ) != GetCurrentThreadId() ||
!(data = X11DRV_create_win_data( owner )))
if (!(data = X11DRV_create_win_data( owner )))
return (Window)GetPropA( owner, whole_window_prop );
}
else if (!data->managed && force_managed) /* make it managed */
......@@ -2001,6 +2000,8 @@ struct x11drv_win_data *X11DRV_create_win_data( HWND hwnd )
/* don't create win data for HWND_MESSAGE windows */
if (parent != GetDesktopWindow() && !GetAncestor( parent, GA_PARENT )) return NULL;
if (GetWindowThreadProcessId( hwnd, NULL ) != GetCurrentThreadId()) return NULL;
display = thread_init_display();
if (!(data = alloc_win_data( display, hwnd ))) return NULL;
......
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