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

server: GetQueueStatus should clear only checked queue changed bits.

parent d31e8a31
......@@ -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);
}
......
......@@ -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");
......
......@@ -2822,7 +2822,7 @@ struct set_queue_mask_reply
struct get_queue_status_request
{
struct request_header __header;
int clear;
unsigned int clear_bits;
};
struct get_queue_status_reply
{
......@@ -5972,6 +5972,6 @@ union generic_reply
struct terminate_job_reply terminate_job_reply;
};
#define SERVER_PROTOCOL_VERSION 467
#define SERVER_PROTOCOL_VERSION 468
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
......@@ -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 */
......
......@@ -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;
}
......
......@@ -1416,7 +1416,7 @@ C_ASSERT( sizeof(struct set_queue_mask_request) == 24 );
C_ASSERT( FIELD_OFFSET(struct set_queue_mask_reply, wake_bits) == 8 );
C_ASSERT( FIELD_OFFSET(struct set_queue_mask_reply, changed_bits) == 12 );
C_ASSERT( sizeof(struct set_queue_mask_reply) == 16 );
C_ASSERT( FIELD_OFFSET(struct get_queue_status_request, clear) == 12 );
C_ASSERT( FIELD_OFFSET(struct get_queue_status_request, clear_bits) == 12 );
C_ASSERT( sizeof(struct get_queue_status_request) == 16 );
C_ASSERT( FIELD_OFFSET(struct get_queue_status_reply, wake_bits) == 8 );
C_ASSERT( FIELD_OFFSET(struct get_queue_status_reply, changed_bits) == 12 );
......
......@@ -2546,7 +2546,7 @@ static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
static void dump_get_queue_status_request( const struct get_queue_status_request *req )
{
fprintf( stderr, " clear=%d", req->clear );
fprintf( stderr, " clear_bits=%08x", req->clear_bits );
}
static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
......
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