Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update event handling for context_menu overlay #187

Merged

Conversation

Remmirad
Copy link

This tries to fix #178 .

This changes when events are forwarded to the child of the context menu.
It allows widgets like sliders to be used in a context menu since it now forwards "Released" events to the child. (Otherwise the slider would still be grabbed when reopening the menu)

This also prevents a click event from going through the context menu, when e.g. a "Released" event happens inside the content bounds but the content returns Ignored. Since the context_menu takes action here by closing itself it also should catch the event.

Copy link
Collaborator

@genusistimelord genusistimelord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good thank you.

@genusistimelord genusistimelord merged commit b71f220 into iced-rs:main Sep 30, 2023
2 checks passed
@Remmirad Remmirad deleted the context-menu-release-event-handling branch October 3, 2023 09:34
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.

Release-event handling in ContextMenu
2 participants