[PATCH] server: Return the correct key state

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Tue May 14 04:54:00 CDT 2019


This makes the return value reply->state consistent with
reply->state = desktop->keystate[req->key & 0xff] & ~0x40;

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30814

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
 server/queue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/queue.c b/server/queue.c
index 24239916af..3c1c6c168f 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -2842,8 +2842,8 @@ DECL_HANDLER(get_key_state)
         if (!(desktop = get_thread_desktop( current, 0 ))) return;
         if (req->key >= 0)
         {
-            reply->state = desktop->keystate[req->key & 0xff];
             desktop->keystate[req->key & 0xff] &= ~0x40;
+            reply->state = desktop->keystate[req->key & 0xff];
         }
         set_reply_data( desktop->keystate, size );
         release_object( desktop );
-- 
2.20.1



More information about the wine-devel mailing list