Aric Stewart
c937155ff6
server: Take into account extra_size in get_rawinput_buffer.
2022-11-17 21:51:42 +01:00
Rémi Bernon
9804210966
server: Remove no-op raw_msg.foreground release.
...
It's previously set to NULL and never updated.
2022-11-14 13:17:31 +01:00
Rémi Bernon
28aa321f36
server: Avoid reallocating rawinput device array with zero size.
...
It actually frees the pointer.
2022-08-08 18:50:54 +02:00
Rémi Bernon
a2395ecf96
server: Use the client provided rawinput registered device array.
2022-07-28 20:08:58 +02:00
Rémi Bernon
1587e9db88
win32u: Implement NtUserGetRegisteredRawInputDevices on the client side.
2022-07-28 20:08:58 +02:00
Rémi Bernon
c57eda2432
server: Avoid using pointer value after realloc.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-15 11:57:08 +02:00
Rémi Bernon
68b6e876f0
server: Create message queue and thread input in get_key_state.
...
This removes the fallback to desktop async keystate and uses instead the
keystate synchronization logic in all cases.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26269
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=27238
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=31899
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=35907
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45385
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-26 13:53:29 +02:00
Rémi Bernon
f076e5f854
server: Lock thread input keystate whenever it is modified.
...
And synchronize it with desktop async keystate, on GetKeyState calls,
if it is not locked yet.
Based on a patch from Sebastian Lackner <sebastian@fds-team.de>.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26269
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=27238
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=31899
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=35907
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45385
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-26 13:53:26 +02:00
Rémi Bernon
ff74d5c244
server: Create message queue and thread input in set_key_state.
...
This marks one test case as todo, but it was an outlier, and the 'X' key
state is now wrong in all cases. Overall this makes the tests results
more coherent.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26269
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=27238
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=31899
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=35907
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45385
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-26 13:53:18 +02:00
Rémi Bernon
095204a9f3
server: Return error when hardware message is too large.
...
So that the client allocates a larger receive buffer when needed and not
trigger the assert below when setting the reply message data.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-12 17:27:50 +01:00
Ziqing Hui
77f1658393
server: Also queue hotkey message for WM_SYSKEYDOWN.
...
ALT and F10 key generate WM_SYSKEYDOWN message.
They should also have the ability to queue hotkey message.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-02 17:09:39 +01:00
Huw Davies
6fdae1979b
configure: Stop checking for poll.h and sys/poll.h - always use poll.h.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-31 17:56:54 +01:00
Zebediah Figura
f393ab2636
server: Zero-initialize rawinput_message structures before passing them to queue_rawinput_message() (Valgrind).
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-13 13:05:23 +02:00
Alexandre Julliard
c954e5b9e6
server: Avoid using wine/port.h.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-07 18:03:11 +02:00
Rémi Bernon
fc64aa7e7c
server: Send HID report data with the WM_INPUT messages.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 12:31:21 +02:00
Rémi Bernon
109de60873
server: Support variable sized hardware_msg_data allocation.
...
The RIM_TYPEHID messages will have to carry the variable length HID
report.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 12:30:49 +02:00
Rémi Bernon
1128a37e77
user32: Implement WM_INPUT / RIM_TYPEHID message dispatch.
...
Without any HID report data for now.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 12:30:41 +02:00
Rémi Bernon
e8498788e8
server: Add hardware_msg_data size for variable size messages.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 12:30:36 +02:00
Rémi Bernon
4e956dc0fe
server: Implement WM_INPUT_DEVICE_CHANGE message dispatch.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-11 21:51:46 +02:00
Rémi Bernon
3481dc05e9
server: Broadcast rawinput messages when desktop is NULL.
...
HID rawinput hardware messages are sent from winedevice.exe, which is
attached to the services desktop. We need to broadcast its messages to
all (interactive) desktops instead.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-11 21:51:44 +02:00
Rémi Bernon
371be0bc1c
server: Add support for RIDEV_DEVNOTIFY rawinput flag.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-11 21:51:42 +02:00
Rémi Bernon
2d8f98fd4e
server: Add an explicit message field in rawinput_message.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-11 21:51:40 +02:00
Rémi Bernon
427168ba5a
server: Add process argument to find_rawinput_device.
...
And use it to find registered HID rawinput devices.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-11 21:51:37 +02:00
Rémi Bernon
2fcc1d0ecd
server: Split the fallback to desktop async keystate.
...
When current thread doesn't have a message queue. It's going to be
removed later anyway.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26269
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=27238
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=31899
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=35907
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45385
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-02 22:52:34 +02:00
Rémi Bernon
6444e4fade
server: Remove tid from set_key_state request.
...
As it is always set to GetCurrentThreadId().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26269
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=27238
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=31899
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=35907
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45385
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-02 22:51:50 +02:00
Rémi Bernon
626870abe2
server: Remove tid from get_key_state request.
...
And replace it with an async param if we want the global async keystate.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26269
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=27238
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=31899
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=35907
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45385
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-02 22:51:21 +02:00
Rémi Bernon
50798b1320
server: Grow rawinput buffer instead of allocating its maximum size.
...
Call of Duty: WWII call GetRawInputBuffer with very large client buffer,
so the maximum buffer size may be large and it causes an unnecessary
load on wineserver when it allocates and clears the reply buffer.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 11:39:47 +01:00
Alexandre Julliard
d6ef9401b3
server: Use the object type information to implement access mapping.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 22:53:46 +01:00
Alexandre Julliard
c6f2aacb57
server: Add a type descriptor to all server objects.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-04 21:25:32 +01:00
Arkadiusz Hiler
f7edc32818
user32: Implement GetMouseMovePointsEx().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36873
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 22:37:16 +02:00
Alexandre Julliard
2e51f9aae3
server: Add an object operation to retrieve an object name.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 16:55:08 +02:00
Rémi Bernon
1e7378d80c
user32: Implement GetRegisteredRawInputDevices.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:17:11 +02:00
Huw Davies
434871fd1b
server: Remove unnecessary 'remove' parameter from accept_hardware_message request.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-07 19:24:27 +02:00
Rémi Bernon
3a9edf9aad
user32: Implement GetRawInputBuffer.
...
CoD: WWII uses it to read mouse motion instead of listening to WM_INPUT
messages.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 21:07:37 +02:00
Rémi Bernon
27a52d0414
server: Implement RegisterRawInputDevices RIDEV_INPUTSINK flag.
...
This flag allows applications to receive rawinput messages while in
background. They have to specify a target hwnd, which will receive them,
and the messages will carry a RIM_INPUTSINK wparam if the process wasn't
foreground.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 23:08:30 +02:00
Rémi Bernon
8cf7fe3b7c
server: Implement RegisterRawInputDevices RIDEV_NOLEGACY flag.
...
This makes legacy mouse window messages such as WM_MOUSEMOVE and others,
to stop being sent, including to low-level hooks. The desktop mouse
state should still be udpated.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 23:08:30 +02:00
Rémi Bernon
4d844b449e
server: Pass msg and wparam to update_input_key_state helper.
...
So that we can update individual states in next patch.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 23:08:30 +02:00
Rémi Bernon
b48887bb01
server: Split cursor position update to update_desktop_cursor_pos.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 23:08:30 +02:00
Rémi Bernon
57124b9905
server: Implement rawinput inter-process message dispatch.
...
This delivers the rawinput messages to the correct process, regardless
of where the input was received.
As for now RIDEV_INPUTSINK is still not implemented, this only fixes
the case where input is injected in a background process and where it
should not receive rawinput -as in the test- or when cursor moves over
a background window and the foreground process should have received
rawinput messages.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 23:08:30 +02:00
Piotr Caban
af89b53cef
server: Use monotonic clock for SetTimer timeouts.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-09 21:04:04 +02:00
Zebediah Figura
f5f633e712
server: Validate the filter window handle in get_message.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-18 21:55:16 +02:00
Nikolay Sivov
a476ae1991
server: Use KEYEVENTF_UNICODE mode only when virtual key code was not specified.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-01 14:41:39 +02:00
Jacek Caban
b2a546c92d
server: Introduce kernel_object struct for generic association between server and kernel objects.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:55:15 +01:00
Sebastian Lackner
5ff6a11697
server: Improve handling of cursor position clipping for empty rectangle.
...
Based on a patch by Kevin Buhr.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38791
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42631
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-18 16:04:03 +01:00
Andre Heider
27ff04e2ab
server: Fix keyboard hardware message regression.
...
Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-12 10:28:09 +01:00
Alexandre Julliard
4da1c4370b
user32: Implement GetCurrentInputMessageSource().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-05 19:12:12 +01:00
Alexandre Julliard
383cf211da
server: Add a helper function to allocate a hardware message.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-05 19:12:12 +01:00
Michael Stefaniuc
9e365e4ecc
server: Use the ARRAY_SIZE() macro.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-23 13:56:55 +02:00
Alexandre Julliard
70dd64cf97
server: Add a helper function to validate a window handle.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-30 18:08:36 +09:00
Alexandre Julliard
c6f12bd9cc
server: Notify all listeners when the contents of the clipboard have changed.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-30 16:33:04 +09:00