MouseMove events bubble up and are posted by Screen#2987
Merged
rodrigogiraoserrao merged 3 commits intoTextualize:mainfrom Aug 8, 2023
Merged
Conversation
… widget. Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
rodrigogiraoserrao
approved these changes
Jul 22, 2023
Contributor
rodrigogiraoserrao
left a comment
There was a problem hiding this comment.
This looks good to me!
We may prefer the changelog message in the "Changed" section, though.
Contributor
|
@willmcgugan review away. |
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.
Please review the following checklist.
This PR changes the behavior of MouseMove events to bubble up from Widgets.
Screenreceives the MouseMove event when there's no other Widget in the App.Note: The relative coordinates of the MouseMove events do not change when bubbling up, i.e. they always stay relative to the Widget that received the event. This behavior is consistent with other mouse events such as Click.
There's some more room for refactoring as the handling of MouseMove and MouseEvent in Screen._forward_event is almost the same. The main difference seems to be that MouseEvent sets or resets the focused widget, whereas MouseMove sets or resets the mouse over.
Closes #2905