Release capture after switching to other app w/Alt+tab (fix #325, #5601)#5691
Merged
Conversation
Collaborator
|
clang-tidy review says "All clean, LGTM! 👍" |
Member
Author
|
I'm taking this PR back because https://github.com/aseprite/aseprite/actions/runs/22776507662/job/66071133540 is failing, it looks like on Windows a WA_INACTIVE message is received when the HWND is being destroyed and a reference to a deleted os::Window used in some place. |
Collaborator
|
clang-tidy review says "All clean, LGTM! 👍" |
Member
Author
Fixed with: aseprite/laf@57b22eb |
, aseprite#5601) Switching to another app will generate a kMouseUpMessage without button (kButtonNone) for the capture_widget so it can release the mouse and go back to its idle state.
Collaborator
|
clang-tidy review says "All clean, LGTM! 👍" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should fix #325, after receiving an
os::Event::WindowLeavemessage (e.g. because another native window is activated by the user), we check if there is a widget with the mouse capture and generate ankMouseUpMessagewithout buttons (kButtonNone) for that specific widget, which can be processed just like a regularkMouseUpMessage.It's similar to #5601 but doesn't require a new
ui::MessageTypeand this fixes issues with the sprite Editor, Timeline, and color bar (PaletteView, e.g. when we are dragging colors).