Aric Stewart aric@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.
On 5/4/15 2:34 AM, Alexandre Julliard wrote:
Aric Stewart aric@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.
Ok thanks! resent!
-aric