Since whole_rect / client_rect are updated asynchronously, there may be
a small lag between X11 and Wine regarding the expected window position.
Then, as events' x and y fields are reported relative to the X11 window
position, this lag can cause inconsistencies when we compute absolute
mouse positions.
Also, applications that control their own position while being moved
cause additional whole_rect / client_rect updates, before X11 knows
about it.
This can make applications like Winamp go nuts when they are being moved
and move all over the place "randomly".
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46309
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Calling get_input_codepage involves doing quite a lot of things, and
doing it for every message type, when it's not needed, is inefficient.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
The WmShowRestoreMinimizedOverlappedSeq message sequence in tests
clearly show that there is a WM_ACTIVATE message at the end of
ShowWindow() calls after restoring a minimized window, and it's
not from SetFocus().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47507
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
It looks like that GetKeyState is supposed to catch key presses when
called from a background thread even after its thread message queue and
thread input structures have been created.
This happens in Bioshock 2 Remaster, and causes the game to stay forever
on a "Press space to continue" screen, as the thread checking for space
key press calls GetKeyState repeatedly (and PeekMessage), although it's
in background.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26269
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Some applications (e.g. Lego Worlds, Hitman 2) use (-32000,-32000) to
determine whether a window is minimized.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Even though MSDN says 0 and 1 are both valid and they represent the default refresh rate of display
hardware. Some games rely on the value being the real refresh rate and use it to cap frame rates.
Fix an issue that Sakuna: Of Rice and Ruin reports monitors of 1Hz and cap to 1fps.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
In particular, test sending WM_CANCELMODE to a parent of the capture window.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Killing explorer breaks later tests. We can create a new desktop
without a shell instead.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48142
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
WM_DEVICECHANGE's lParam can be either a pointer to a variant of
DEV_BROADCAST_HDR or an immediate value (usually 0) depending on
the wParam's value.
This fixes a crash when broadcasting WM_DEVICECHANGE with
wParam = DBT_DEVNODES_CHANGED, lParam = 0.
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
get_display_dc() may be locking display_dc_section at the end of
user driver initialization in LoadCursorA() called from
register_builtin_classes(). If the driver initialization initiated
in CreateDCW() goes in parallel with the initialization started
elsewhere without holding display_dc_section, the process can deadlock.
Fixes random lockup on start in Hammerting.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
No need to pass parameters via struct copying.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>