Module: wine Branch: master Commit: e280527f6b8e610a004061cdaaef18e09a446af8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e280527f6b8e610a004061cdaa...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Aug 30 12:11:43 2012 +0200
winex11: Never attempt to create the window data from a different thread.
---
dlls/winex11.drv/window.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 5840e85..1404c88 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -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;