[2/2] server: GetQueueStatus should clear only checked queue changed bits.
Dmitry Timoshkov
dmitry at baikal.ru
Tue Apr 21 03:01:37 CDT 2015
---
dlls/user32/input.c | 4 ++--
dlls/user32/tests/msg.c | 1 -
server/protocol.def | 2 +-
server/queue.c | 2 +-
4 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index 57594a7..4fcc531 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -434,7 +434,7 @@ DWORD WINAPI GetQueueStatus( UINT flags )
SERVER_START_REQ( get_queue_status )
{
- req->clear = 1;
+ req->clear_bits = flags;
wine_server_call( req );
ret = MAKELONG( reply->changed_bits & flags, reply->wake_bits & flags );
}
@@ -454,7 +454,7 @@ BOOL WINAPI GetInputState(void)
SERVER_START_REQ( get_queue_status )
{
- req->clear = 0;
+ req->clear_bits = 0;
wine_server_call( req );
ret = reply->wake_bits & (QS_KEY | QS_MOUSEBUTTON);
}
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 4794b12..50e1e2b 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -14699,7 +14699,6 @@ static void test_SendMessage_other_thread(int thread_n)
}
ret = GetQueueStatus(QS_SENDMESSAGE|QS_POSTMESSAGE);
-todo_wine
ok(ret == MAKELONG(QS_POSTMESSAGE, QS_SENDMESSAGE|QS_POSTMESSAGE), "wrong status %08x\n", ret);
trace("main: call GetMessage\n");
diff --git a/server/protocol.def b/server/protocol.def
index 54501e8..5d57f96 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -2059,7 +2059,7 @@ enum char_info_mode
/* Get the current message queue status */
@REQ(get_queue_status)
- int clear; /* should we clear the change bits? */
+ unsigned int clear_bits; /* should we clear the change bits? */
@REPLY
unsigned int wake_bits; /* wake bits */
unsigned int changed_bits; /* changed bits since last time */
diff --git a/server/queue.c b/server/queue.c
index 3a321cd..912df3a 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -2198,7 +2198,7 @@ DECL_HANDLER(get_queue_status)
{
reply->wake_bits = queue->wake_bits;
reply->changed_bits = queue->changed_bits;
- if (req->clear) queue->changed_bits = 0;
+ queue->changed_bits &= ~req->clear_bits;
}
else reply->wake_bits = reply->changed_bits = 0;
}
--
2.3.5
More information about the wine-patches
mailing list