user32: Destroy window server objects from destroy_thread_windows.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
72ec1c18a0
commit
6366694d2b
|
@ -1216,6 +1216,15 @@ void destroy_thread_windows(void)
|
|||
win->obj.handle = *free_list_ptr;
|
||||
free_list_ptr = (WND **)&win->obj.handle;
|
||||
}
|
||||
if (free_list)
|
||||
{
|
||||
SERVER_START_REQ( destroy_window )
|
||||
{
|
||||
req->handle = 0; /* destroy all thread windows */
|
||||
wine_server_call( req );
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
}
|
||||
USER_Unlock();
|
||||
|
||||
while ((win = free_list))
|
||||
|
|
|
@ -2101,8 +2101,13 @@ DECL_HANDLER(set_parent)
|
|||
/* destroy a window */
|
||||
DECL_HANDLER(destroy_window)
|
||||
{
|
||||
struct window *win = get_window( req->handle );
|
||||
if (win)
|
||||
struct window *win;
|
||||
|
||||
if (!req->handle)
|
||||
{
|
||||
destroy_thread_windows( current );
|
||||
}
|
||||
else if ((win = get_window( req->handle )))
|
||||
{
|
||||
if (!is_desktop_window(win)) free_window_handle( win );
|
||||
else if (win->thread == current) detach_window_thread( win );
|
||||
|
|
Loading…
Reference in New Issue