mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibGUI: Fix missing equality checks in Window::did_remove_widget()
We should only detach from the cursor tracking widgets on unparenting if they were the same widget that's being unparented! Thanks to @agoose77 for spotting this! Fixes #1354.
This commit is contained in:
parent
c982bfee7e
commit
211e938234
Notes:
sideshowbarker
2024-07-19 08:53:15 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/211e9382340
1 changed files with 2 additions and 2 deletions
|
@ -695,9 +695,9 @@ void Window::did_remove_widget(Badge<Widget>, const Widget& widget)
|
|||
m_focused_widget = nullptr;
|
||||
if (m_hovered_widget == &widget)
|
||||
m_hovered_widget = nullptr;
|
||||
if (m_global_cursor_tracking_widget)
|
||||
if (m_global_cursor_tracking_widget == &widget)
|
||||
m_global_cursor_tracking_widget = nullptr;
|
||||
if (m_automatic_cursor_tracking_widget)
|
||||
if (m_automatic_cursor_tracking_widget == &widget)
|
||||
m_automatic_cursor_tracking_widget = nullptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue