Commit Graph

149 Commits

Author SHA1 Message Date
Alexandre Julliard 5ad25c293b user32: Use wide character string literals.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:09:59 +02:00
Alexandre Julliard 9cc9236556 user32: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 15:15:38 +02:00
Rémi Bernon e0e3b6bc91 user32: Use WM_INPUT message hw_id as RAWINPUT handle.
This fixes the GetRawInputData regression introduced with
359ee2ecc2 where the message data couldn't
be read twice, while keeping the overwrite logic it introduced.

This also adds some SetLastError to fix some unit tests todos.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49522
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-07 22:24:39 +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 b269354f45 user32: Introduce rawinput_thread_data helper.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 21:06:57 +02:00
Rémi Bernon 262ad90d3f user32: Introduce rawinput_from_hardware_message helper.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 21:06:55 +02:00
Matteo Bruni f0e9cf1145 user32: Make sure update_window_state() is always executed on the owner thread.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-05 16:54:35 +02:00
Brendan Shanks b7121813bc user32: Pack messages sent with SendNotifyMessage().
Allows Wine internal messages with pointer arguments to be sent
asynchronously.

Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-31 10:47:54 +01:00
Zebediah Figura 7c768d9052 user32: Return -1 from peek_message() on error.
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
Alexandre Julliard 4da1c4370b user32: Implement GetCurrentInputMessageSource().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-05 19:12:12 +01:00
Alexandre Julliard 771123afb6 user32: Add stub for GetCurrentInputMessageSource().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-05 19:12:12 +01:00
Alexandre Julliard 2068b73db5 user32: Process hardware messages in physical coordinates.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-27 14:25:17 +02:00
Alexandre Julliard e95d0c6849 user32: Take into account the offset between old and new parent in SetParent().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-07 12:00:17 +02:00
Michael Stefaniuc e8411d22d5 user32: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-02 16:02:53 +02:00
Huw Davies 0d9ce8a025 user32: Add a heuristic to find the mouse message's window.
This can't be done properly without support from the native windowing
system.  However, it's a good bet to try the next window in the z-order
if it's the owner of the original window and it's in the same thread.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-06 14:28:10 +01:00
Alexandre Julliard 01676c5dd6 user32: Use the magic format string prefix for relay traces.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-25 12:05:40 +01:00
Alexandre Julliard 3ab6174997 user32: Use the correct top-level window when activating through a mouse click.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-01 09:15:44 +02:00
Zebediah Figura ae153a5c2c user32: Allow activating the desktop window.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 19:13:31 +02:00
Huw Davies 8d10b5cecc user32: Use the original message's wparam during the double-click comparison.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-05 19:49:35 +02:00
Zebediah Figura fe95de98b5 user32: Move internal message from EnableWindow to WIN_SetStyle().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-25 11:47:20 +02:00
Alexandre Julliard 7594afeb6c user32: Fix InSendMessage return value.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-30 14:38:15 +09:00
Sebastian Lackner 57b7a9937d user32: Implement SetCoalescableTimer and add basic tests.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-29 20:30:57 +09:00
Sebastian Lackner b4ac51effa user32: Do not block sending/posting WM_NOTIFY messages.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-20 16:54:47 +09:00
Nikolay Sivov ad7cb43657 user32: Limit broadcast messages to system and registered ones.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-09 00:12:24 +09:00
Kira Backes 94aee7a738 user32: Add MOUSEHOOKSTRUCTEX for mouse wheel support.
Signed-off-by: Kira Backes <kira.backes@nrwsoft.de>
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-05 14:06:50 +09:00
Qian Hong 43197e6641 user32: Properly handle WM_DEVICECHANGE in is_pointer_message().
Signed-off-by: Qian Hong <qhong@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-30 17:27:52 +01:00
Alex Henrie 5b53c0b88b user32: Avoid double initialization.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-06 21:59:08 +09:00
Stefan Dösinger ccf430eb52 user32: Silently ignore temporary foreground loss.
The basic problem is this: Thread A has a window W1 that is it's focus
window and the system-global foreground window. At some point thread A
stops processing messages. After that, thread B creates a window W2
and makes it the foreground window. Thread B later on makes W1 (from
Thread A) the foreground window again. After restoring W1 as the
foreground window, Thread A processes window messages again. Two
WM_WINE_SETACTIVEWINDOW messages are in the queue, one for losing the
foreground thread propery and one for restoring it. The first one will
generates a WM_ACTIVATEAPP(0) message, which causes D3D to minimize
the game window.

The included test shows that Windows doesn't deliver any
WM_ACTIVATEAPP messages if the thread stopped being the foreground
thread and re-gained that property between two message processing
calls. It isn't implemented with a plain WM_ACTIVATEAPP filter, the
manually injected message in the test still gets through.

Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-01 22:53:53 +09:00
Alexandre Julliard 247275aec3 server: Return a valid position also in posted messages. 2015-04-27 18:04:59 +09:00
Sebastian Lackner d3be42ab96 user32: Invalidate key state cache globally after running LL hooks. 2015-04-07 15:14:04 +09:00
Sebastian Lackner 325c061bbd user32: Move key state cache into a separate struct. 2015-04-07 15:14:02 +09:00
Qian Hong cd21d2dbda user32: Add more exception handlings for timer callbacks. 2014-11-11 16:15:46 +09:00
Piotr Caban f747e5c8c9 user32: Don't move mouse hardware messages to other threads queues. 2014-10-17 17:51:55 +09:00
Alexandre Julliard 82bee5ceda user32: Properly block sent messages while waiting for a reply with SMTO_BLOCK. 2014-06-17 15:14:51 +02:00
Sebastian Lackner e9fbcc8360 user32: Avoid race-condition when unloading module while hook is still active.
Based on a patch by Sam Revitch.
2014-06-17 10:40:12 +02:00
Erich E. Hoover b5bd529769 user32: Reduce the minimum Set[System]Timer from 15 ms to 10 ms. 2014-05-01 18:56:46 +02:00
Alexandre Julliard b045851648 user32: Cache the server queue mask on the client side and reset them when they have changed. 2014-04-10 16:29:18 +02:00
Nikolay Sivov d3c9e8a7e6 user32: Added ChangeWindowMessageFilterEx() stub. 2014-03-20 17:46:01 +01:00
Alexandre Julliard fc183ba2c5 user32: Set the queue mask only after flushing the window surfaces. 2014-03-19 15:56:22 +01:00
Frédéric Delanoy 762aef6613 user32: Use BOOL type where appropriate. 2013-11-20 11:26:30 +01:00
Frédéric Delanoy 77ee42fd33 user32: Use BOOL type where appropriate. 2013-11-05 11:15:06 +01:00
Alexandre Julliard fe441a0682 user32: Register classes once the graphics driver has been loaded, except for the desktop class. 2013-10-24 19:01:54 +02:00
Alexandre Julliard 6d0d7e08e5 user32: Fix the scope of a local variable. 2013-10-21 14:48:20 +02:00
Michael Stefaniuc 7c7fa1051c user32: Avoid using CONST. 2013-09-24 12:57:57 +02:00
Alexandre Julliard fa311c57bf user32: Check for driver events more quickly once we start getting timer messages. 2013-07-02 19:39:34 +02:00
Huw Davies 5d5d0935ea user32: Use the codepage associated with the input locale for WM_CHAR-type conversions. 2013-05-21 16:59:58 +02:00
Huw Davies bf85df3f0e user32: Move back to using WC<->MB in order to specify an alternative codepage. 2013-05-21 16:55:11 +02:00
Erich Hoover 057b0d8bca user32: SetTimer and SetSystemTimer should respect the timeout limits. 2013-05-06 15:55:20 +02:00
Aric Stewart 6e4cbd5787 user32: ImmProcessKey is only called on WM_KEYDOWN and if the message is being removed. 2013-03-28 18:55:58 +01:00
Ken Thomases 5fb543f6e2 user32: In TranslateMessage, handle ToUnicode returning 2 or more chars. 2013-02-05 11:07:02 +01:00