server: Do not send messages for events that are not currently being selected for.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-05-12 21:59:23 -05:00 committed by Alexandre Julliard
parent 11102116ac
commit 037fccc0df
2 changed files with 2 additions and 2 deletions

View File

@ -4177,7 +4177,7 @@ static void test_connect_events(struct event_test_ctx *ctx)
server = accept(listener, NULL, NULL);
ok(server != -1, "failed to accept, error %u\n", WSAGetLastError());
check_events_todo_msg(ctx, FD_WRITE, 0, 200);
check_events(ctx, FD_WRITE, 0, 200);
select_events(ctx, client, FD_ACCEPT | FD_CLOSE | FD_CONNECT | FD_OOB | FD_READ | FD_WRITE);

View File

@ -413,7 +413,7 @@ static void sock_wake_up( struct sock *sock )
for (i = 0; i < FD_MAX_EVENTS; i++)
{
int event = event_bitorder[i];
if (sock->pending_events & (1 << event))
if (events & (1 << event))
{
lparam_t lparam = (1 << event) | (sock->errors[event] << 16);
post_message( sock->window, sock->message, sock->wparam, lparam );