[Bug 60179] New: Regression (11.12 → 11.13): mouse clicks on a newly-shown owned/modal dialog are misrouted to the owner window, or silently fail to trigger the clicked control's notification
http://bugs.winehq.org/show_bug.cgi?id=60179 Bug ID: 60179 Summary: Regression (11.12 → 11.13): mouse clicks on a newly-shown owned/modal dialog are misrouted to the owner window, or silently fail to trigger the clicked control's notification Product: Wine Version: 11.13 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: win32u Assignee: wine-bugs@list.winehq.org Reporter: kahlil88mph@protonmail.com Target Milestone: --- Distribution: ArchLinux Created attachment 81843 --> http://bugs.winehq.org/attachment.cgi?id=81843 Trimmed WINEDEBUG traces Between Wine 11.12 and 11.13, mouse click handling for a modal dialog shown on top of its owner window regressed. Two related but distinct symptoms are reproducible, both tied to the same window/owner relationship at the moment a new top-level dialog appears: 1. Clicks landing within the dialog's screen bounds are sometimes dispatched to a control on the **owner window underneath** instead of the dialog, even though the dialog is the window actually visible/topmost on screen. 2. When the click **does** reach the correct control (e.g. a "Close" button on the dialog), the button goes through a fully normal-looking `WM_LBUTTONDOWN → WM_SETFOCUS → WM_LBUTTONUP → WM_CAPTURECHANGED` sequence, but never sends the resulting `WM_COMMAND` (`BN_CLICKED`) notification to the dialog, so the click has no effect. Activating the same button via keyboard (Space bar) works every time, since that path skips whatever position check is failing on mouse-up. A user-discovered workaround: briefly "shading" and un-shading the dialog window (or resizing/maximizing-then-restoring the owner window) temporarily restores correct click behavior, consistent with a stale cached window rect/z-order being recalculated on any geometry-change event. Specifically, the program in question is Duplicate Cleaner Free 3.2.7 (DigitalVolcano Software) — a .NET WinForms application (owner-drawn buttons via `WM_DRAWITEM`, runs under wine-mono). Likely reproducible with any WinForms app that shows an owned dialog immediately after a background operation completes. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60179 Austin English <austinenglish@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Summary|Regression (11.12 → 11.13): |Duplicate Cleaner Free |mouse clicks on a |3.2.7: mouse clicks on a |newly-shown owned/modal |newly-shown owned/modal |dialog are misrouted to the |dialog are misrouted to the |owner window, or silently |owner window, or silently |fail to trigger the clicked |fail to trigger the clicked |control's notification |control's notification --- Comment #1 from Austin English <austinenglish@gmail.com> --- Please run a regression test: https://gitlab.winehq.org/wine/wine/-/wikis/Regression-Testing Does this software have a free demo/download? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60179 --- Comment #2 from kahlil88mph@protonmail.com --- Can be downloaded from here: https://www.digitalvolcano.co.uk/dcdownload_versions.html -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60179 Ken Sharp <imwellcushtymelike@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |https://www.digitalvolcano. | |co.uk/download/DuplicateCle | |anerPro4_setup.exe --- Comment #3 from Ken Sharp <imwellcushtymelike@gmail.com> --- Backup: https://web.archive.org/web/20250418143912/https://www.digitalvolcano.co.uk/... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60179 --- Comment #4 from kahlil88mph@protonmail.com --- Ran a full regression test using `git bisect run` with an automated pass/fail oracle rather than manual testing at each step. Setup: - Built from source (`./configure ... --disable-tests --without-opencl`, gcc 16.2.1 host / mingw-w64-gcc 16.1.0 PE, ccache) at each candidate commit. - Narrowed the bisect range with a pathspec, since the area of the regression was already known from earlier WINEDEBUG tracing: `git bisect start -- dlls/win32u/input.c dlls/win32u/message.c dlls/win32u/window.c dlls/win32u/defwnd.c dlls/user32/input.c server/queue.c server/window.c` - `git bisect good wine-11.12`, `git bisect bad wine-11.13` (confirmed both endpoints manually before trusting the automation). - Oracle script: launch Duplicate Cleaner Free in a dedicated WINEPREFIX, run a scan against a small fixed local dataset, then perform a realistic (gradual mouse movement + held press, not an instant synthetic click) click on the "Scan Complete" dialog's Close button. exit 0 if the dialog actually closes, exit 1 if it's still open after 5 attempts, exit 125 (skip) on any build/launch failure unrelated to the regression itself. - `git bisect run` completed unattended across the narrowed ~15-commit range. Result: 695e721719e761023018a90a0f0828a566bd676b is the first bad commit commit 695e721719e761023018a90a0f0828a566bd676b Author: Rémi Bernon <rbernon@codeweavers.com> Date: Tue Jun 9 14:44:43 2026 +0200 win32u: Keep track of client surface toplevel window. dlls/win32u/window.c | 17 +++++++++++++---- dlls/winewayland.drv/wayland_surface.c | 6 ++++-- dlls/winewayland.drv/window.c | 2 +- dlls/winex11.drv/init.c | 4 ++-- include/wine/gdi_driver.h | 1 + 5 files changed, 21 insertions(+), 9 deletions(-) This matches the mechanism suspected from the earlier trace evidence. Before this commit, `X11DRV_client_surface_present`, `client_surface_update_geometry`, and the Wayland equivalents called `NtUserGetAncestor(hwnd, GA_ROOT)` fresh on every use to find a surface's current top-level window. This commit caches that lookup once in a new `surface->toplevel` field (set in `client_surface_create()` and refreshed only in `client_surface_update_locked()`) and switches those call sites to use the cached value instead of re-querying it. The cache doesn't appear to get invalidated at the right moment when a new owned/modal dialog is created and becomes the real top-level window for a control's rendering surface. The surface's X11-level geometry/stacking stays associated with the previous top-level window, which is consistent with both symptoms in this report: clicks geometrically inside the new dialog being routed to a control on the old (owner) window, and — when the click does reach the right control — the surface/window state around it being stale enough that the click-to-notification step silently fails. Happy to test a candidate patch, attach the full build/bisect log, or provide any additional WINEDEBUG traces against this specific commit if that's useful. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60179 --- Comment #5 from kahlil88mph@protonmail.com --- Created attachment 81864 --> http://bugs.winehq.org/attachment.cgi?id=81864 Automated git bisect run log (11.12 good → 695e721719 first bad) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60179 kahlil88mph@protonmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon@codeweavers.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60179 Austin English <austinenglish@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |695e721719e761023018a90a0f0 | |828a566bd676b -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60179 --- Comment #6 from Rémi Bernon <rbernon@codeweavers.com> --- The cached toplevel is supposed to be updated from SetParent: ``` new_toplevel = NtUserGetAncestor( parent, GA_ROOT ); old_toplevel = NtUserGetAncestor( old_parent, GA_ROOT ); if (new_toplevel != old_toplevel) { if (new_toplevel) update_window_state( new_toplevel ); if (old_toplevel) update_window_state( old_toplevel ); } ``` And `update_window_state` should end up calling `update_client_surfaces`. Of course it's possible that I'm missing something but I cannot reproduce any obvious issues with the application mentioned here. Could you please give a bit more detailed reproduction scenario? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60179 --- Comment #7 from kahlil88mph@protonmail.com --- Easiest way to reproduce the bug is to run a scan. There is a "scan complete" window that shows up and clicking "close" doesn't close it. Once highlighted, it will respond to pressing the space bar, or if you shade and unshade the window it will work normally. Other buttons in the main window will become unresponsive in a similar manner and will usually work again after resizing the window. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla