Commit Graph

237 Commits

Author SHA1 Message Date
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
Alexandre Julliard f55db7882d server: Add link_name and unlink_name object operations.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-04 21:07:19 +09:00
Piotr Caban cefdbd59b7 server: Avoid infinite loop when we're out of timers in set_win_timer server call.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-26 23:26:59 +09:00
Anton Baskanov 9220556560 user32: Correctly update caret state in the server in SetCaretPos.
Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-25 18:27:31 +09:00
Qian Hong 499f0454c9 server: Remove out of date comment.
Signed-off-by: Qian Hong <qhong@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-20 22:19:28 +09:00
Sebastian Lackner 55c4a108d7 server: Only send WM_WINE_CLIPCURSOR for forced clip resets.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-12 22:17:02 +09:00
Sebastian Lackner 8723d3455e server: Add fallback to desktop keystate in get_key_state wineserver call. 2015-07-10 15:07:45 +09:00
Sebastian Lackner 4439cd433d server: attach_thread_input shouldn't create queues for foreign threads. 2015-05-18 19:59:28 +09:00
Aric Stewart 3599f956e2 server: Fixup input windows on thread_detach. 2015-05-06 20:54:55 +09:00
Alexandre Julliard 247275aec3 server: Return a valid position also in posted messages. 2015-04-27 18:04:59 +09:00