Commit f846312f authored by Alexandre Julliard's avatar Alexandre Julliard

server: Restore the masks from the previous get_message when a wait is satisfied.

parent fc183ba2
...@@ -117,8 +117,10 @@ struct msg_queue ...@@ -117,8 +117,10 @@ struct msg_queue
struct fd *fd; /* optional file descriptor to poll */ struct fd *fd; /* optional file descriptor to poll */
unsigned int wake_bits; /* wakeup bits */ unsigned int wake_bits; /* wakeup bits */
unsigned int wake_mask; /* wakeup mask */ unsigned int wake_mask; /* wakeup mask */
unsigned int wake_get_msg; /* wakeup mask of last get_message */
unsigned int changed_bits; /* changed wakeup bits */ unsigned int changed_bits; /* changed wakeup bits */
unsigned int changed_mask; /* changed wakeup mask */ unsigned int changed_mask; /* changed wakeup mask */
unsigned int changed_get_msg; /* changed wakeup mask of last get_message */
int paint_count; /* pending paint messages count */ int paint_count; /* pending paint messages count */
int hotkey_count; /* pending hotkey messages count */ int hotkey_count; /* pending hotkey messages count */
int quit_message; /* is there a pending quit message? */ int quit_message; /* is there a pending quit message? */
...@@ -277,8 +279,10 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_ ...@@ -277,8 +279,10 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
queue->fd = NULL; queue->fd = NULL;
queue->wake_bits = 0; queue->wake_bits = 0;
queue->wake_mask = 0; queue->wake_mask = 0;
queue->wake_get_msg = 0;
queue->changed_bits = 0; queue->changed_bits = 0;
queue->changed_mask = 0; queue->changed_mask = 0;
queue->changed_get_msg = 0;
queue->paint_count = 0; queue->paint_count = 0;
queue->hotkey_count = 0; queue->hotkey_count = 0;
queue->quit_message = 0; queue->quit_message = 0;
...@@ -927,8 +931,8 @@ static int msg_queue_signaled( struct object *obj, struct wait_queue_entry *entr ...@@ -927,8 +931,8 @@ static int msg_queue_signaled( struct object *obj, struct wait_queue_entry *entr
static void msg_queue_satisfied( struct object *obj, struct wait_queue_entry *entry ) static void msg_queue_satisfied( struct object *obj, struct wait_queue_entry *entry )
{ {
struct msg_queue *queue = (struct msg_queue *)obj; struct msg_queue *queue = (struct msg_queue *)obj;
queue->wake_mask = 0; queue->wake_mask = queue->wake_get_msg;
queue->changed_mask = 0; queue->changed_mask = queue->changed_get_msg;
} }
static void msg_queue_destroy( struct object *obj ) static void msg_queue_destroy( struct object *obj )
...@@ -2197,7 +2201,11 @@ DECL_HANDLER(set_queue_mask) ...@@ -2197,7 +2201,11 @@ DECL_HANDLER(set_queue_mask)
if (is_signaled( queue )) if (is_signaled( queue ))
{ {
/* if skip wait is set, do what would have been done in the subsequent wait */ /* if skip wait is set, do what would have been done in the subsequent wait */
if (req->skip_wait) queue->wake_mask = queue->changed_mask = 0; if (req->skip_wait)
{
queue->wake_mask = queue->wake_get_msg;
queue->changed_mask = queue->changed_get_msg;
}
else wake_up( &queue->obj, 0 ); else wake_up( &queue->obj, 0 );
} }
} }
...@@ -2369,6 +2377,7 @@ DECL_HANDLER(get_message) ...@@ -2369,6 +2377,7 @@ DECL_HANDLER(get_message)
if (!queue) return; if (!queue) return;
queue->last_get_msg = current_time; queue->last_get_msg = current_time;
queue->wake_get_msg = queue->changed_get_msg = 0;
if (!filter) filter = QS_ALLINPUT; if (!filter) filter = QS_ALLINPUT;
/* first check for sent messages */ /* first check for sent messages */
...@@ -2440,8 +2449,8 @@ DECL_HANDLER(get_message) ...@@ -2440,8 +2449,8 @@ DECL_HANDLER(get_message)
} }
if (get_win == -1 && current->process->idle_event) set_event( current->process->idle_event ); if (get_win == -1 && current->process->idle_event) set_event( current->process->idle_event );
queue->wake_mask = req->wake_mask; queue->wake_mask = queue->wake_get_msg = req->wake_mask;
queue->changed_mask = req->changed_mask; queue->changed_mask = queue->changed_get_msg = req->changed_mask;
set_error( STATUS_PENDING ); /* FIXME */ set_error( STATUS_PENDING ); /* FIXME */
} }
......
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