Skip to content

Comments

Add Widget::propagates_pointer_interaction method.#1659

Merged
PoignardAzur merged 3 commits intolinebender:mainfrom
PoignardAzur:contains_pointer_events
Feb 19, 2026
Merged

Add Widget::propagates_pointer_interaction method.#1659
PoignardAzur merged 3 commits intolinebender:mainfrom
PoignardAzur:contains_pointer_events

Conversation

@PoignardAzur
Copy link
Contributor

This is a cleaner way to make Button and similar widgets have exclusively control of their pointer events, rather than making every widget that might be inside a button never accept them.

This is a cleaner way to make Button and similar widgets have exclusively control of their pointer events, rather than making every widget that might be inside a button never accept them.
Copy link
Member

@xStrom xStrom left a comment

Choose a reason for hiding this comment

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

Functionality makes sense.

I'm not too sure about the name though, it's not immediately clear at all what's the difference between accepts_pointer_interaction and contains_pointer_interactions. Also why is only one of them plural?

captures_ seems a bit better, but I guess it has a conflict with the existing pointer capture functionality.

terminates_ or concludes_ or even just ends_ make it more clear that the interaction will end but don't make it clear whether the widget itself will still get the event.

Perhaps the bool should be flipped and then it could be propagates_pointer_interaction. Because that's what it actually controls, right? Propagation of the pointer interaction to its children.

@PoignardAzur
Copy link
Contributor Author

Yeah, I'm not too sure about the naming.

Perhaps the bool should be flipped and then it could be propagates_pointer_interaction. Because that's what it actually controls, right? Propagation of the pointer interaction to its children.

Good idea, thanks!

@PoignardAzur PoignardAzur force-pushed the contains_pointer_events branch from be8799b to c15719a Compare February 18, 2026 18:00
@PoignardAzur PoignardAzur changed the title Add Widget::contains_pointer_interactions method. Add Widget::propagates_pointer_interaction method. Feb 19, 2026
@PoignardAzur PoignardAzur added this pull request to the merge queue Feb 19, 2026
Merged via the queue into linebender:main with commit dbf014a Feb 19, 2026
17 checks passed
@PoignardAzur PoignardAzur deleted the contains_pointer_events branch February 19, 2026 12:22
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.

2 participants