Rebase against f9741837a3bff3a912442695b4f7c3f5efbef557.

This commit is contained in:
Alistair Leslie-Hughes
2025-05-09 13:30:18 +10:00
parent abf4b4db07
commit 86a7c93cdd
5 changed files with 82 additions and 90 deletions

View File

@@ -1,4 +1,4 @@
From 27e2bc1b0d098abce9168ea46589024054817e25 Mon Sep 17 00:00:00 2001
From 52be83d9a557eec924a964944e6b926fb1e347ad Mon Sep 17 00:00:00 2001
From: Zebediah Figura <zfigura@codeweavers.com>
Date: Mon, 6 Jul 2020 16:01:56 -0500
Subject: [PATCH] server: Create eventfd file descriptors for message queues.
@@ -8,10 +8,10 @@ Subject: [PATCH] server: Create eventfd file descriptors for message queues.
1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/server/queue.c b/server/queue.c
index ee575724e4e..60f0c043257 100644
index a3479055ed4..08635c047b2 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -44,6 +44,7 @@
@@ -45,6 +45,7 @@
#include "process.h"
#include "request.h"
#include "user.h"
@@ -19,15 +19,15 @@ index ee575724e4e..60f0c043257 100644
#define WM_NCMOUSEFIRST WM_NCMOUSEMOVE
#define WM_NCMOUSELAST (WM_NCMOUSEFIRST+(WM_MOUSELAST-WM_MOUSEFIRST))
@@ -144,6 +145,7 @@ struct msg_queue
@@ -135,6 +136,7 @@ struct msg_queue
int keystate_lock; /* owns an input keystate lock */
const queue_shm_t *shared; /* queue in session shared memory */
queue_shm_t *shared; /* queue in session shared memory */
unsigned int ignore_post_msg; /* ignore post messages newer than this unique id */
+ int esync_fd; /* esync file descriptor (signalled on message) */
};
struct hotkey
@@ -160,6 +162,7 @@ static void msg_queue_dump( struct object *obj, int verbose );
@@ -151,6 +153,7 @@ static void msg_queue_dump( struct object *obj, int verbose );
static int msg_queue_add_queue( struct object *obj, struct wait_queue_entry *entry );
static void msg_queue_remove_queue( struct object *obj, struct wait_queue_entry *entry );
static int msg_queue_signaled( struct object *obj, struct wait_queue_entry *entry );
@@ -35,7 +35,7 @@ index ee575724e4e..60f0c043257 100644
static void msg_queue_satisfied( struct object *obj, struct wait_queue_entry *entry );
static void msg_queue_destroy( struct object *obj );
static void msg_queue_poll_event( struct fd *fd, int event );
@@ -175,7 +178,7 @@ static const struct object_ops msg_queue_ops =
@@ -166,7 +169,7 @@ static const struct object_ops msg_queue_ops =
msg_queue_add_queue, /* add_queue */
msg_queue_remove_queue, /* remove_queue */
msg_queue_signaled, /* signaled */
@@ -44,7 +44,7 @@ index ee575724e4e..60f0c043257 100644
msg_queue_satisfied, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
@@ -313,6 +316,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
@@ -317,6 +320,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
queue->last_get_msg = current_time;
queue->keystate_lock = 0;
queue->ignore_post_msg = 0;
@@ -52,7 +52,7 @@ index ee575724e4e..60f0c043257 100644
list_init( &queue->send_result );
list_init( &queue->callback_result );
list_init( &queue->pending_timers );
@@ -335,6 +339,9 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
@@ -339,6 +343,9 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
}
SHARED_WRITE_END;
@@ -62,7 +62,7 @@ index ee575724e4e..60f0c043257 100644
thread->queue = queue;
if ((desktop = get_thread_desktop( thread, 0 )))
@@ -685,6 +692,9 @@ static inline void clear_queue_bits( struct msg_queue *queue, unsigned int bits
@@ -753,6 +760,9 @@ static inline void clear_queue_bits( struct msg_queue *queue, unsigned int bits
if (queue->keystate_lock) unlock_input_keystate( queue->input );
queue->keystate_lock = 0;
}
@@ -72,7 +72,7 @@ index ee575724e4e..60f0c043257 100644
}
/* check if message is matched by the filter */
@@ -1227,6 +1237,13 @@ static int msg_queue_signaled( struct object *obj, struct wait_queue_entry *entr
@@ -1335,6 +1345,13 @@ static int msg_queue_signaled( struct object *obj, struct wait_queue_entry *entr
return ret || is_signaled( queue );
}
@@ -86,7 +86,7 @@ index ee575724e4e..60f0c043257 100644
static void msg_queue_satisfied( struct object *obj, struct wait_queue_entry *entry )
{
struct msg_queue *queue = (struct msg_queue *)obj;
@@ -1278,6 +1295,7 @@ static void msg_queue_destroy( struct object *obj )
@@ -1391,6 +1408,7 @@ static void msg_queue_destroy( struct object *obj )
if (queue->hooks) release_object( queue->hooks );
if (queue->fd) release_object( queue->fd );
if (queue->shared) free_shared_object( queue->shared );
@@ -94,7 +94,7 @@ index ee575724e4e..60f0c043257 100644
}
static void msg_queue_poll_event( struct fd *fd, int event )
@@ -3000,6 +3018,9 @@ DECL_HANDLER(set_queue_mask)
@@ -3181,6 +3199,9 @@ DECL_HANDLER(set_queue_mask)
}
else wake_up( &queue->obj, 0 );
}
@@ -104,7 +104,7 @@ index ee575724e4e..60f0c043257 100644
}
}
@@ -3020,6 +3041,9 @@ DECL_HANDLER(get_queue_status)
@@ -3201,6 +3222,9 @@ DECL_HANDLER(get_queue_status)
shared->changed_bits &= ~req->clear_bits;
}
SHARED_WRITE_END;
@@ -114,7 +114,7 @@ index ee575724e4e..60f0c043257 100644
}
else reply->wake_bits = reply->changed_bits = 0;
}
@@ -3286,6 +3310,10 @@ DECL_HANDLER(get_message)
@@ -3469,6 +3493,10 @@ DECL_HANDLER(get_message)
SHARED_WRITE_END;
set_error( STATUS_PENDING ); /* FIXME */
@@ -126,5 +126,5 @@ index ee575724e4e..60f0c043257 100644
found_msg:
--
2.43.0
2.47.2

View File

@@ -1,4 +1,4 @@
From 7522f4cf4bb29413bce97be5e61ebaefb5276c77 Mon Sep 17 00:00:00 2001
From c9d64a429d4343f4ceb53ae28ecc380aaa42b09e Mon Sep 17 00:00:00 2001
From: Zebediah Figura <zfigura@codeweavers.com>
Date: Mon, 6 Jul 2020 16:11:23 -0500
Subject: [PATCH] server, ntdll: Implement message waits.
@@ -10,10 +10,10 @@ Subject: [PATCH] server, ntdll: Implement message waits.
3 files changed, 77 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
index 399930c444b..06d7d8babc6 100644
index b2204d44ed9..3af79a2de15 100644
--- a/dlls/ntdll/unix/esync.c
+++ b/dlls/ntdll/unix/esync.c
@@ -474,12 +474,13 @@ static void update_grabbed_object( struct esync *obj )
@@ -476,12 +476,13 @@ static void update_grabbed_object( struct esync *obj )
/* A value of STATUS_NOT_IMPLEMENTED returned from this function means that we
* need to delegate to server_select(). */
@@ -28,7 +28,7 @@ index 399930c444b..06d7d8babc6 100644
LONGLONG timeleft;
LARGE_INTEGER now;
ULONGLONG end;
@@ -507,6 +508,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
@@ -509,6 +510,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
return ret;
}
@@ -38,7 +38,7 @@ index 399930c444b..06d7d8babc6 100644
if (has_esync && has_server)
FIXME("Can't wait on esync and server objects at the same time!\n");
else if (has_server)
@@ -518,6 +522,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
@@ -520,6 +524,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
for (i = 0; i < count; i++)
TRACE(" %p", handles[i]);
@@ -48,7 +48,7 @@ index 399930c444b..06d7d8babc6 100644
if (!timeout)
TRACE(", timeout = INFINITE.\n");
else
@@ -557,7 +564,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
@@ -559,7 +566,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
int64_t value;
ssize_t size;
@@ -59,7 +59,7 @@ index 399930c444b..06d7d8babc6 100644
{
/* Don't grab the object, just check if it's signaled. */
if (fds[i].revents & POLLIN)
@@ -602,6 +611,44 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
@@ -604,6 +613,44 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
}
}
@@ -105,10 +105,10 @@ index 399930c444b..06d7d8babc6 100644
{
struct stat st;
diff --git a/server/protocol.def b/server/protocol.def
index 56f2d263100..46cdbbed9b7 100644
index 86040d5b619..c2fdec93b8d 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3968,6 +3968,10 @@ enum esync_type
@@ -4121,6 +4121,10 @@ enum esync_type
unsigned int shm_idx;
@END
@@ -120,18 +120,18 @@ index 56f2d263100..46cdbbed9b7 100644
@REQ(set_keyboard_repeat)
int enable; /* whether to enable auto-repeat */
diff --git a/server/queue.c b/server/queue.c
index 60f0c043257..d6b6f2f20aa 100644
index 08635c047b2..8f1a68acd7f 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -146,6 +146,7 @@ struct msg_queue
const queue_shm_t *shared; /* queue in session shared memory */
@@ -137,6 +137,7 @@ struct msg_queue
queue_shm_t *shared; /* queue in session shared memory */
unsigned int ignore_post_msg; /* ignore post messages newer than this unique id */
int esync_fd; /* esync file descriptor (signalled on message) */
+ int esync_in_msgwait; /* our thread is currently waiting on us */
};
struct hotkey
@@ -317,6 +318,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
@@ -321,6 +322,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
queue->keystate_lock = 0;
queue->ignore_post_msg = 0;
queue->esync_fd = -1;
@@ -139,7 +139,7 @@ index 60f0c043257..d6b6f2f20aa 100644
list_init( &queue->send_result );
list_init( &queue->callback_result );
list_init( &queue->pending_timers );
@@ -1183,6 +1185,10 @@ static int is_queue_hung( struct msg_queue *queue )
@@ -1291,6 +1293,10 @@ static int is_queue_hung( struct msg_queue *queue )
if (get_wait_queue_thread(entry)->queue == queue)
return 0; /* thread is waiting on queue -> not hung */
}
@@ -150,7 +150,7 @@ index 60f0c043257..d6b6f2f20aa 100644
return 1;
}
@@ -4079,6 +4085,23 @@ DECL_HANDLER(update_rawinput_devices)
@@ -4281,6 +4287,23 @@ DECL_HANDLER(update_rawinput_devices)
}
}
@@ -174,11 +174,11 @@ index 60f0c043257..d6b6f2f20aa 100644
DECL_HANDLER(set_keyboard_repeat)
{
struct desktop *desktop;
@@ -4097,3 +4120,4 @@ DECL_HANDLER(set_keyboard_repeat)
@@ -4299,3 +4322,4 @@ DECL_HANDLER(set_keyboard_repeat)
release_object( desktop );
}
+
--
2.43.0
2.47.2

View File

@@ -1,4 +1,4 @@
From 1569189e4213b5df68680c56e18f397873bc19aa Mon Sep 17 00:00:00 2001
From 31eece6eff95baed8c1d9404d2cfc05834df9753 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 15 Mar 2015 01:05:48 +0100
Subject: [PATCH] server: Fix handling of GetMessage after previous PeekMessage
@@ -15,10 +15,10 @@ Changes in v3:
2 files changed, 65 insertions(+), 17 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 9282896262e..d4749a1eb57 100644
index a5f7318dffd..e50ddc45038 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -14478,13 +14478,10 @@ static void test_PeekMessage3(void)
@@ -14569,13 +14569,10 @@ static void test_PeekMessage3(void)
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
PostMessageA(hwnd, WM_USER, 0, 0);
ret = PeekMessageA(&msg, hwnd, 0, 0, PM_NOREMOVE);
@@ -32,7 +32,7 @@ index 9282896262e..d4749a1eb57 100644
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = PeekMessageA(&msg, hwnd, 0, 0, 0);
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
@@ -14494,10 +14491,8 @@ static void test_PeekMessage3(void)
@@ -14585,10 +14582,8 @@ static void test_PeekMessage3(void)
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
PostMessageA(hwnd, WM_USER, 0, 0);
ret = PeekMessageA(&msg, hwnd, 0, 0, PM_REMOVE);
@@ -43,7 +43,7 @@ index 9282896262e..d4749a1eb57 100644
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = PeekMessageA(&msg, hwnd, 0, 0, 0);
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
@@ -14509,10 +14504,11 @@ static void test_PeekMessage3(void)
@@ -14600,10 +14595,11 @@ static void test_PeekMessage3(void)
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
PostMessageA(hwnd, WM_USER, 0, 0);
ret = GetMessageA(&msg, hwnd, 0, 0);
@@ -57,7 +57,7 @@ index 9282896262e..d4749a1eb57 100644
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = PeekMessageA(&msg, hwnd, 0, 0, 0);
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
@@ -14540,14 +14536,32 @@ static void test_PeekMessage3(void)
@@ -14631,14 +14627,32 @@ static void test_PeekMessage3(void)
ret = GetMessageA(&msg, hwnd, 0, 0);
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = GetMessageA(&msg, hwnd, 0, 0);
@@ -93,18 +93,18 @@ index 9282896262e..d4749a1eb57 100644
* because both messages are in the same queue. */
diff --git a/server/queue.c b/server/queue.c
index 520659d377c..2d23fb0def8 100644
index cfbc9e6c89b..f07b73e3ce9 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -133,6 +133,7 @@ struct msg_queue
@@ -134,6 +134,7 @@ struct msg_queue
timeout_t last_get_msg; /* time of last get message call */
int keystate_lock; /* owns an input keystate lock */
const queue_shm_t *shared; /* queue in session shared memory */
queue_shm_t *shared; /* queue in session shared memory */
+ unsigned int ignore_post_msg; /* ignore post messages newer than this unique id */
};
struct hotkey
@@ -312,6 +313,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
@@ -313,6 +314,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
queue->hooks = NULL;
queue->last_get_msg = current_time;
queue->keystate_lock = 0;
@@ -112,7 +112,7 @@ index 520659d377c..2d23fb0def8 100644
list_init( &queue->send_result );
list_init( &queue->callback_result );
list_init( &queue->pending_timers );
@@ -792,13 +794,21 @@ static inline struct msg_queue *get_current_queue(void)
@@ -793,13 +795,21 @@ static inline struct msg_queue *get_current_queue(void)
}
/* get a (pseudo-)unique id to tag hardware messages */
@@ -135,7 +135,7 @@ index 520659d377c..2d23fb0def8 100644
/* lookup an already queued mouse message that matches the message, window and type */
static struct message *find_mouse_message( struct thread_input *input, const struct message *msg )
{
@@ -1144,7 +1154,7 @@ static int match_window( user_handle_t win, user_handle_t msg_win )
@@ -1150,7 +1160,7 @@ static int match_window( user_handle_t win, user_handle_t msg_win )
}
/* retrieve a posted message */
@@ -144,7 +144,7 @@ index 520659d377c..2d23fb0def8 100644
unsigned int first, unsigned int last, unsigned int flags,
struct get_message_reply *reply )
{
@@ -1155,6 +1165,7 @@ static int get_posted_message( struct msg_queue *queue, user_handle_t win,
@@ -1161,6 +1171,7 @@ static int get_posted_message( struct msg_queue *queue, user_handle_t win,
{
if (!match_window( win, msg->win )) continue;
if (!check_msg_filter( msg->msg, first, last )) continue;
@@ -152,7 +152,7 @@ index 520659d377c..2d23fb0def8 100644
goto found; /* found one */
}
return 0;
@@ -1835,6 +1846,7 @@ found:
@@ -1841,6 +1852,7 @@ found:
msg->msg = WM_HOTKEY;
msg->wparam = hotkey->id;
msg->lparam = ((hotkey->vkey & 0xffff) << 16) | modifiers;
@@ -160,7 +160,7 @@ index 520659d377c..2d23fb0def8 100644
free( msg->data );
msg->data = NULL;
@@ -2821,7 +2833,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
@@ -2827,7 +2839,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
}
/* now we can return it */
@@ -169,7 +169,7 @@ index 520659d377c..2d23fb0def8 100644
reply->type = MSG_HARDWARE;
reply->win = win;
reply->msg = msg_code;
@@ -2928,6 +2940,7 @@ void post_message( user_handle_t win, unsigned int message, lparam_t wparam, lpa
@@ -2934,6 +2946,7 @@ void post_message( user_handle_t win, unsigned int message, lparam_t wparam, lpa
msg->result = NULL;
msg->data = NULL;
msg->data_size = 0;
@@ -177,7 +177,7 @@ index 520659d377c..2d23fb0def8 100644
get_message_defaults( thread->queue, &msg->x, &msg->y, &msg->time );
@@ -3245,6 +3258,7 @@ DECL_HANDLER(send_message)
@@ -3251,6 +3264,7 @@ DECL_HANDLER(send_message)
set_queue_bits( recv_queue, QS_SENDMESSAGE );
break;
case MSG_POSTED:
@@ -185,7 +185,7 @@ index 520659d377c..2d23fb0def8 100644
list_add_tail( &recv_queue->msg_list[POST_MESSAGE], &msg->entry );
set_queue_bits( recv_queue, QS_POSTMESSAGE|QS_ALLPOSTMESSAGE );
if (msg->msg == WM_HOTKEY)
@@ -3379,12 +3393,12 @@ DECL_HANDLER(get_message)
@@ -3385,12 +3399,12 @@ DECL_HANDLER(get_message)
/* then check for posted messages */
if ((filter & QS_POSTMESSAGE) &&
@@ -200,7 +200,7 @@ index 520659d377c..2d23fb0def8 100644
return;
/* only check for quit messages if not posted messages pending */
@@ -3395,7 +3409,7 @@ DECL_HANDLER(get_message)
@@ -3401,7 +3415,7 @@ DECL_HANDLER(get_message)
if ((filter & QS_INPUT) &&
filter_contains_hw_range( req->get_first, req->get_last ) &&
get_hardware_message( current, req->hw_id, get_win, req->get_first, req->get_last, req->flags, reply ))
@@ -209,7 +209,7 @@ index 520659d377c..2d23fb0def8 100644
/* now check for WM_PAINT */
if ((filter & QS_PAINT) &&
@@ -3408,7 +3422,7 @@ DECL_HANDLER(get_message)
@@ -3414,7 +3428,7 @@ DECL_HANDLER(get_message)
reply->wparam = 0;
reply->lparam = 0;
get_message_defaults( queue, &reply->x, &reply->y, &reply->time );
@@ -218,7 +218,7 @@ index 520659d377c..2d23fb0def8 100644
}
/* now check for timer */
@@ -3424,9 +3438,19 @@ DECL_HANDLER(get_message)
@@ -3430,9 +3444,19 @@ DECL_HANDLER(get_message)
get_message_defaults( queue, &reply->x, &reply->y, &reply->time );
if (!(req->flags & PM_NOYIELD) && current->process->idle_event)
set_event( current->process->idle_event );
@@ -239,7 +239,7 @@ index 520659d377c..2d23fb0def8 100644
if (get_win == -1 && current->process->idle_event) set_event( current->process->idle_event );
SHARED_WRITE_BEGIN( queue_shm, queue_shm_t )
@@ -3437,6 +3461,13 @@ DECL_HANDLER(get_message)
@@ -3443,6 +3467,13 @@ DECL_HANDLER(get_message)
SHARED_WRITE_END;
set_error( STATUS_PENDING ); /* FIXME */
@@ -253,7 +253,7 @@ index 520659d377c..2d23fb0def8 100644
}
@@ -3454,7 +3485,10 @@ DECL_HANDLER(reply_message)
@@ -3460,7 +3491,10 @@ DECL_HANDLER(reply_message)
DECL_HANDLER(accept_hardware_message)
{
if (current->queue)

View File

@@ -1,4 +1,4 @@
From 2c353379e4e6da08174cc6bc7b0fd95f26c2d16e Mon Sep 17 00:00:00 2001
From 402e92f4ed878da989eff02544d81a0965a0eda7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Mon, 26 Aug 2019 14:37:20 +0200
Subject: [PATCH] server: Add send_hardware_message flags for rawinput
@@ -6,15 +6,15 @@ Subject: [PATCH] server: Add send_hardware_message flags for rawinput
---
include/ntuser.h | 4 ++++
server/protocol.def | 5 ++---
server/queue.c | 26 +++++++++++++++-----------
3 files changed, 21 insertions(+), 14 deletions(-)
server/protocol.def | 3 +--
server/queue.c | 20 ++++++++++++--------
3 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/include/ntuser.h b/include/ntuser.h
index 3d981927395..f20945f4122 100644
index 9922c1da4b2..58407b55fd5 100644
--- a/include/ntuser.h
+++ b/include/ntuser.h
@@ -1613,6 +1613,10 @@ struct hid_packet
@@ -1555,6 +1555,10 @@ struct hid_packet
C_ASSERT(sizeof(struct hid_packet) == offsetof(struct hid_packet, data[0]));
@@ -26,21 +26,19 @@ index 3d981927395..f20945f4122 100644
{
UINT flags;
diff --git a/server/protocol.def b/server/protocol.def
index ae53a65db64..1fcace0d131 100644
index 483fcac1392..f7c65b265e6 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -2262,8 +2262,8 @@ enum message_type
/* Send a hardware message to a thread queue */
@@ -2328,7 +2328,7 @@ enum message_type
@REQ(send_hardware_message)
user_handle_t win; /* window handle */
- union hw_input input; /* input data */
union hw_input input; /* input data */
- unsigned int flags; /* flags (see below) */
+ union hw_input input; /* input data */
+ unsigned int flags; /* flags (see ntuser.h) */
VARARG(report,bytes); /* HID report data */
@REPLY
int wait; /* do we need to wait for a reply? */
@@ -2272,7 +2272,6 @@ enum message_type
@@ -2337,7 +2337,6 @@ enum message_type
int new_x; /* new cursor position */
int new_y;
@END
@@ -49,21 +47,19 @@ index ae53a65db64..1fcace0d131 100644
/* Get a message from the current queue */
diff --git a/server/queue.c b/server/queue.c
index 94169a57db6..9695eceff28 100644
index c9ef7aef80a..c4987eb1a2e 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -2243,8 +2243,8 @@ static void dispatch_rawinput_message( struct desktop *desktop, struct rawinput_
}
@@ -2285,7 +2285,7 @@ static void dispatch_rawinput_message( struct desktop *desktop, struct rawinput_
/* queue a hardware message for a mouse event */
-static int queue_mouse_message( struct desktop *desktop, user_handle_t win, const union hw_input *input,
static int queue_mouse_message( struct desktop *desktop, user_handle_t win, const union hw_input *input,
- unsigned int origin, struct msg_queue *sender )
+static int queue_mouse_message( struct desktop *desktop, user_handle_t win, const union hw_input *input,
+ unsigned int origin, struct msg_queue *sender, unsigned int send_flags )
{
const desktop_shm_t *desktop_shm = desktop->shared;
desktop_shm_t *desktop_shm = desktop->shared;
struct hardware_msg_data *msg_data;
@@ -2305,7 +2305,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
@@ -2345,7 +2345,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
y = desktop_shm->cursor.y;
}
@@ -72,7 +68,7 @@ index 94169a57db6..9695eceff28 100644
{
memset( &raw_msg, 0, sizeof(raw_msg) );
raw_msg.foreground = foreground;
@@ -2320,6 +2320,8 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
@@ -2360,6 +2360,8 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
release_object( foreground );
}
@@ -81,13 +77,11 @@ index 94169a57db6..9695eceff28 100644
for (i = 0; i < ARRAY_SIZE( messages ); i++)
{
if (!messages[i]) continue;
@@ -2349,15 +2351,15 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
return wait;
@@ -2390,14 +2392,14 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
}
-static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const union hw_input *input,
static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const union hw_input *input,
- unsigned int origin, struct msg_queue *sender, int repeat );
+static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const union hw_input *input,
+ unsigned int origin, struct msg_queue *sender, int repeat, unsigned int send_flags);
static void key_repeat_timeout( void *private )
@@ -100,18 +94,16 @@ index 94169a57db6..9695eceff28 100644
}
static void stop_key_repeat( struct desktop *desktop )
@@ -2369,8 +2371,8 @@ static void stop_key_repeat( struct desktop *desktop )
}
@@ -2410,7 +2412,7 @@ static void stop_key_repeat( struct desktop *desktop )
/* queue a hardware message for a keyboard event */
-static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const union hw_input *input,
static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const union hw_input *input,
- unsigned int origin, struct msg_queue *sender, int repeat )
+static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const union hw_input *input,
+ unsigned int origin, struct msg_queue *sender, int repeat, unsigned int send_flags )
{
const desktop_shm_t *desktop_shm = desktop->shared;
desktop_shm_t *desktop_shm = desktop->shared;
struct hw_msg_source source = { IMDT_KEYBOARD, origin };
@@ -2493,7 +2495,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
@@ -2533,7 +2535,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
}
}
@@ -120,7 +112,7 @@ index 94169a57db6..9695eceff28 100644
{
struct rawinput_message raw_msg = {0};
raw_msg.foreground = foreground;
@@ -2508,6 +2510,8 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
@@ -2548,6 +2550,8 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
release_object( foreground );
}
@@ -129,7 +121,7 @@ index 94169a57db6..9695eceff28 100644
if (!(msg = alloc_hardware_message( input->kbd.info, source, time, 0 ))) return 0;
msg_data = msg->data;
@@ -3294,10 +3298,10 @@ DECL_HANDLER(send_hardware_message)
@@ -3344,10 +3348,10 @@ DECL_HANDLER(send_hardware_message)
switch (req->input.type)
{
case INPUT_MOUSE:
@@ -143,5 +135,5 @@ index 94169a57db6..9695eceff28 100644
case INPUT_HARDWARE:
queue_custom_hardware_message( desktop, req->win, origin, &req->input );
--
2.45.2
2.47.2

View File

@@ -1 +1 @@
d8a271c053bb23171355854d7af155b3bda7e8a9
f9741837a3bff3a912442695b4f7c3f5efbef557