server: fixup input windows on thread_detach

Alexandre Julliard julliard at winehq.org
Mon May 4 02:34:21 CDT 2015


Aric Stewart <aric at codeweavers.com> writes:

> @@ -1075,6 +1075,27 @@ int attach_thread_input( struct thread *thread_from, struct thread *thread_to )
>      return ret;
>  }
>  
> +/* ensure the input data is correct for the thread after detach */
> +void correct_thread_input( struct thread *thread_from )
> +{
> +    if (thread_from->queue)
> +    {
> +        struct thread *thread;
> +        if (thread_from->queue->input->focus)
> +        {
> +            thread = get_window_thread( thread_from->queue->input->focus );
> +            if (thread != thread_from) thread_from->queue->input->focus = 0;
> +            release_object( thread );
> +        }
> +        if (thread_from->queue->input->active)
> +        {
> +            thread = get_window_thread( thread_from->queue->input->active );
> +            if (thread != thread_from) thread_from->queue->input->active = 0;
> +            release_object( thread );
> +        }
> +    }
> +}

This needs to be done inside detach_thread_input so that it happens for
all callers.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list