Commit 2fcc1d0e authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

server: Split the fallback to desktop async keystate.

parent 6444e4fa
......@@ -2981,16 +2981,9 @@ DECL_HANDLER(get_key_state)
set_reply_data( desktop->keystate, size );
release_object( desktop );
}
else
else if (!current->queue)
{
unsigned char *keystate;
if (current->queue)
{
if (req->key >= 0) reply->state = current->queue->input->keystate[req->key & 0xff];
set_reply_data( current->queue->input->keystate, size );
return;
}
/* fallback to desktop keystate */
if (!(desktop = get_thread_desktop( current, 0 ))) return;
if (req->key >= 0) reply->state = desktop->keystate[req->key & 0xff] & ~0x40;
......@@ -3001,6 +2994,12 @@ DECL_HANDLER(get_key_state)
}
release_object( desktop );
}
else
{
unsigned char *keystate = current->queue->input->keystate;
if (req->key >= 0) reply->state = keystate[req->key & 0xff];
set_reply_data( keystate, size );
}
}
......
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