RESEND: A possible fix for the queue quit flag handling
Dmitry Timoshkov
dmitry at codeweavers.com
Tue Jun 20 05:20:32 CDT 2006
Hello,
here is a resend of a possible fix for the queue quit flag handling.
Changelog:
get_quit_message() should not clear QS_POSTMESSAGE queue state,
but only clear the quit_message flag. Clear QS_POSTMESSAGE state
only if get_posted_message() is going to return FALSE and both posted
messages queue is empty and quit_message flag is not set.
diff -up cvs/hq/wine/dlls/user/tests/msg.c wine/dlls/user/tests/msg.c
--- cvs/hq/wine/dlls/user/tests/msg.c 2006-06-06 17:37:59.000000000 +0900
+++ wine/dlls/user/tests/msg.c 2006-06-20 19:11:46.000000000 +0900
@@ -7537,10 +7537,8 @@ todo_wine {
ok_sequence(WmEmptySeq, "WmEmptySeq", FALSE);
qstatus = GetQueueStatus(qs_all_input);
-todo_wine {
ok(qstatus == MAKELONG(0, QS_POSTMESSAGE),
"wrong qstatus %08lx\n", qstatus);
-}
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE);
diff -up cvs/hq/wine/server/queue.c wine/server/queue.c
--- cvs/hq/wine/server/queue.c 2006-06-10 18:45:32.000000000 +0900
+++ wine/server/queue.c 2006-06-20 18:57:30.000000000 +0900
@@ -651,6 +651,9 @@ static int get_posted_message( struct ms
if (!check_msg_filter( msg->msg, first, last )) continue;
goto found; /* found one */
}
+
+ if (list_empty( &queue->msg_list[POST_MESSAGE] ) && !queue->quit_message)
+ clear_queue_bits( queue, QS_POSTMESSAGE|QS_ALLPOSTMESSAGE );
return 0;
/* return it to the app */
@@ -703,11 +706,8 @@ static int get_quit_message( struct msg_
reply->info = 0;
if (flags & GET_MSG_REMOVE)
- {
queue->quit_message = 0;
- if (list_empty( &queue->msg_list[POST_MESSAGE] ))
- clear_queue_bits( queue, QS_POSTMESSAGE|QS_ALLPOSTMESSAGE );
- }
+
return 1;
}
else
More information about the wine-patches
mailing list