Commit b4227d72 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

server: Make timer id allocation algorithm conform to the Windows one.

parent c77bc840
......@@ -269,7 +269,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
queue->paint_count = 0;
queue->quit_message = 0;
queue->recv_result = NULL;
queue->next_timer_id = 1;
queue->next_timer_id = 0x7fff;
queue->timeout = NULL;
queue->input = (struct thread_input *)grab_object( input );
queue->hooks = NULL;
......@@ -1950,7 +1950,7 @@ DECL_HANDLER(set_win_timer)
do
{
id = queue->next_timer_id;
if (++queue->next_timer_id >= 0x10000) queue->next_timer_id = 1;
if (--queue->next_timer_id <= 0x100) queue->next_timer_id = 0x7fff;
}
while (find_timer( queue, 0, req->msg, id ));
}
......
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