Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibCore: Fix broken "stay_within" mechanism in event dispatch
The "stay_within" parameter to CObject::dispatch_event() optionally specifies a node in the CObject parent chain where event dispatch should stop bubbling upwards. Since event dispatch is done recursively, this was not working right, as we would simply return from the innermost dispatch loop, leaving the event un-accepted, which meant that the penultimately inner dispatch loop would pick up the event and keep bubbling it anyway. This made it possible for events to jump across window boundaries within an application, in cases where one window was a CObject ancestor of another window. This is typically the case with dialog windows. Fix SerenityOS#1078.
- Loading branch information