ChangeSet ID: 21266 CVSROOT: /opt/cvs-commit Module name: wine Changes by: julliard@winehq.org 2005/11/14 09:17:09
Modified files: server : queue.c dlls/user : input.c
Log message: Added support for the QS_ALLPOSTMESSAGE flag.
Patch: http://cvs.winehq.org/patch.py?id=21266
Old revision New revision Changes Path 1.70 1.71 +5 -4 wine/server/queue.c 1.8 1.9 +6 -3 wine/dlls/user/input.c
Index: wine/server/queue.c diff -u -p wine/server/queue.c:1.70 wine/server/queue.c:1.71 --- wine/server/queue.c:1.70 14 Nov 2005 15:17: 9 -0000 +++ wine/server/queue.c 14 Nov 2005 15:17: 9 -0000 @@ -471,7 +471,7 @@ static void remove_queue_message( struct if (list_empty( &queue->msg_list[kind] )) clear_queue_bits( queue, QS_SENDMESSAGE ); break; case POST_MESSAGE: - if (list_empty( &queue->msg_list[kind] )) clear_queue_bits( queue, QS_POSTMESSAGE ); + if (list_empty( &queue->msg_list[kind] )) clear_queue_bits( queue, QS_POSTMESSAGE|QS_ALLPOSTMESSAGE ); break; } free_message( msg ); @@ -1420,7 +1420,7 @@ void post_message( user_handle_t win, un msg->data_size = 0;
list_add_tail( &thread->queue->msg_list[POST_MESSAGE], &msg->entry ); - set_queue_bits( thread->queue, QS_POSTMESSAGE ); + set_queue_bits( thread->queue, QS_POSTMESSAGE|QS_ALLPOSTMESSAGE ); } release_object( thread ); } @@ -1592,7 +1592,7 @@ DECL_HANDLER(send_message) break; } list_add_tail( &recv_queue->msg_list[POST_MESSAGE], &msg->entry ); - set_queue_bits( recv_queue, QS_POSTMESSAGE ); + set_queue_bits( recv_queue, QS_POSTMESSAGE|QS_ALLPOSTMESSAGE ); break; case MSG_HARDWARE: queue_hardware_message( recv_queue, msg ); @@ -1631,7 +1631,8 @@ DECL_HANDLER(get_message) if (req->flags & GET_MSG_SENT_ONLY) goto done; /* nothing else to check */
/* clear changed bits so we can wait on them if we don't find a message */ - queue->changed_bits = 0; + if (req->get_first == 0 && req->get_last == ~0U) queue->changed_bits = 0; + else queue->changed_bits &= QS_ALLPOSTMESSAGE;
/* then check for posted messages */ if (get_posted_message( queue, get_win, req->get_first, req->get_last, req->flags, reply )) Index: wine/dlls/user/input.c diff -u -p wine/dlls/user/input.c:1.8 wine/dlls/user/input.c:1.9 --- wine/dlls/user/input.c:1.8 14 Nov 2005 15:17: 9 -0000 +++ wine/dlls/user/input.c 14 Nov 2005 15:17: 9 -0000 @@ -236,11 +236,14 @@ DWORD WINAPI GetQueueStatus( UINT flags { DWORD ret = 0;
- if (flags & ~0xff) - FIXME("QS_xxxx flags (%04x) are not handled\n", flags & ~0xff); + if (flags & ~(QS_ALLINPUT | QS_ALLPOSTMESSAGE | QS_SMRESULT)) + { + SetLastError( ERROR_INVALID_FLAGS ); + return 0; + }
/* check for pending X events */ - USER_Driver->pMsgWaitForMultipleObjectsEx( 0, NULL, 0, QS_ALLINPUT, 0 ); + USER_Driver->pMsgWaitForMultipleObjectsEx( 0, NULL, 0, flags, 0 );
SERVER_START_REQ( get_queue_status ) {