win32u: Only send mouse input in ReleaseCapture() when a window is captured.
commit818d9a12100bfa6e574e88cd1567985b5884d002
authorZhiyi Zhang <zzhang@codeweavers.com>
Fri, 8 Mar 2024 08:38:16 +0000 (8 16:38 +0800)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 8 Mar 2024 16:37:08 +0000 (8 17:37 +0100)
tree9bb2061f52472a615e7a88f2d096a7d9c0a5d37f
parentd47b13c45aea8809b46ac64e2cdbb300b760549b
win32u: Only send mouse input in ReleaseCapture() when a window is captured.

Fix a regression from "bb496ea8 - server: Always queue mouse messages delivered to another window."

Fix ETHER VAPOR Remaster (214570) launches to black screen when the cursor is in the game window.

The game calls ReleaseCapture() when handling WM_MOUSEMOVE. After bb496ea8, WM_MOUSEMOVE is always
queued because the message window is NULL. So ReleaseCapture() ends up queuing another WM_MOUSEMOVE.
So the game ends up handling infinite WM_MOUSEMOVE messages at startup and is not able to do anything.
dlls/user32/tests/win.c
dlls/win32u/input.c