server-Key_State: Fix test failure in comctl32/listview.

This commit is contained in:
Sebastian Lackner
2015-06-01 21:34:17 +02:00
parent ce3f724ea2
commit ad87c93337
2 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
From 9b712bd80a30791f533cb1552660225ea7434955 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 1 Jun 2015 21:05:14 +0200
Subject: server: Lock thread specific keystate in set_key_state wineserver
call.
---
server/queue.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/server/queue.c b/server/queue.c
index f278861..74e6e24 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -2940,7 +2940,15 @@ DECL_HANDLER(set_key_state)
else
{
if (!(thread = get_thread_from_id( req->tid ))) return;
- if (thread->queue) memcpy( thread->queue->input->keystate, get_req_data(), size );
+ if (thread->queue)
+ {
+ memcpy( thread->queue->input->keystate, get_req_data(), size );
+ if (!thread->queue->keystate_locked)
+ {
+ thread->queue->input->lock_count++;
+ thread->queue->keystate_locked = 1;
+ }
+ }
if (req->async && (desktop = get_thread_desktop( thread, 0 )))
{
memcpy( desktop->keystate, get_req_data(), size );
--
2.4.2