Commit 89a60562 authored by Alexandre Julliard's avatar Alexandre Julliard

winex11: Add window data structure locking to the ReparentNotify event handler.

parent 24c0abfd
...@@ -938,8 +938,13 @@ static void X11DRV_ReparentNotify( HWND hwnd, XEvent *xev ) ...@@ -938,8 +938,13 @@ static void X11DRV_ReparentNotify( HWND hwnd, XEvent *xev )
HWND parent, old_parent; HWND parent, old_parent;
DWORD style; DWORD style;
if (!(data = X11DRV_get_win_data( hwnd ))) return; if (!(data = get_win_data( hwnd ))) return;
if (!data->embedded) return;
if (!data->embedded)
{
release_win_data( data );
return;
}
if (data->whole_window) if (data->whole_window)
{ {
...@@ -947,6 +952,7 @@ static void X11DRV_ReparentNotify( HWND hwnd, XEvent *xev ) ...@@ -947,6 +952,7 @@ static void X11DRV_ReparentNotify( HWND hwnd, XEvent *xev )
{ {
TRACE( "%p/%lx reparented to root\n", hwnd, data->whole_window ); TRACE( "%p/%lx reparented to root\n", hwnd, data->whole_window );
data->embedder = 0; data->embedder = 0;
release_win_data( data );
SendMessageW( hwnd, WM_CLOSE, 0, 0 ); SendMessageW( hwnd, WM_CLOSE, 0, 0 );
return; return;
} }
...@@ -954,6 +960,7 @@ static void X11DRV_ReparentNotify( HWND hwnd, XEvent *xev ) ...@@ -954,6 +960,7 @@ static void X11DRV_ReparentNotify( HWND hwnd, XEvent *xev )
} }
TRACE( "%p/%lx reparented to %lx\n", hwnd, data->whole_window, event->parent ); TRACE( "%p/%lx reparented to %lx\n", hwnd, data->whole_window, event->parent );
release_win_data( data );
style = GetWindowLongW( hwnd, GWL_STYLE ); style = GetWindowLongW( hwnd, GWL_STYLE );
if (event->parent == root_window) if (event->parent == root_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