You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Queued non-client presses lose the button state on caption buttons #266
On Windows, QWindowKit translates queued non-client mouse messages for system buttons into client messages. The left press and release keep their transition; the right, middle, X1 and X2 buttons take their state only from the current physical key snapshot. If the button was released before the queued press is dispatched, the QWidget receives a press with buttons() == Qt::NoButton and no release.
In the probe, a native event filter keeps the physical button up and sends the corresponding non-client press and release to a point classified as HTMAXBUTTON. At a5728ca, the agent path delivers this for all four buttons; the left button control delivers both events. Without an agent, the equivalent client messages are correct.
Measured on Windows Server 2025 with MSVC and Qt 6.8.1 Widgets: baseline and corrected. This extends #259, which fixed the left button only. I have a one-commit fix ready and can open a PR.
Thanks for testing this, Julien. The left-button control and the direct client-message test point to the same timing issue we fixed in #259. I agree with extending that fix to the right, middle, X1 and X2 buttons. The forwarded message should set the affected button’s flag on press or double-click and clear it on release, while preserving the other button and modifier flags. Thanks for opening #267.
Activity
JulienMaille commentedon Nov 28, 2026
@FinnWang-CN what do you think of this one?
FinnWang-CN commentedon Dec 1, 2026
Thanks for testing this, Julien. The left-button control and the direct client-message test point to the same timing issue we fixed in #259. I agree with extending that fix to the right, middle, X1 and X2 buttons. The forwarded message should set the affected button’s flag on press or double-click and clear it on release, while preserving the other button and modifier flags. Thanks for opening #267.