Skip to content

[win] Fix windows never receiving a mouseup event after moving/resizing#182

Open
ckaiser wants to merge 1 commit into
aseprite:mainfrom
ckaiser:fix-resize-mouseup
Open

[win] Fix windows never receiving a mouseup event after moving/resizing#182
ckaiser wants to merge 1 commit into
aseprite:mainfrom
ckaiser:fix-resize-mouseup

Conversation

@ckaiser

@ckaiser ckaiser commented May 20, 2026

Copy link
Copy Markdown
Member

Fixes #aseprite/5449 and potentially a few other edge cases and event weirdness. Inspired by the solution used by Qt.

@dacap

dacap commented May 26, 2026

Copy link
Copy Markdown
Member

I wasn't able to test this yet, but I'm not sure about this solution, probably we could generate a WindowLeave and then a WindowEnter event? similar to aseprite/aseprite@c31aadae9 I need to give a try on Windows yet to check the bug it fixes first.

@ckaiser

ckaiser commented May 26, 2026

Copy link
Copy Markdown
Member Author

It feels more like something that should be handled at the LAF level transparently, since it's a platform quirk combined with a quirk of how we handle mouse input (storing the keys based on events instead of providing ways to query the mouse), but I'm open to suggestions on a different way to go about it

@dacap

dacap commented May 28, 2026

Copy link
Copy Markdown
Member

Just testing on Linux. Pressing all mouse buttons (left/middle/right) on the left window, then Alt+tab to the right window, and release those buttons, laf sends a mouse up for each button to the left window and the capture is lost:

2026-05-28.08-23-29.mp4

I'll test this on Windows later, but I think with this PR we can match the Linux behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Lua API] Resizing/moving dialogue window causes mouse button to be held down for canvas widget

2 participants