Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibGUI: Forget some of Window's widgets eagerly on widget unparenting
Previously the focused widget would only get cleared on replacement or on destruction (being a WeakPtr and all.) This could lead to window dispatching events to a focused widget after it had been removed from the window's widget tree. The same issue existed for the hovered widget, etc. So this patch makes sure that we eagerly clear the various widget pointers in Window immediately when they are removed from the window's widget tree.
- Loading branch information