mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +00:00
LibGUI: Don't let widgets hide tooltips they didn't show
Widget::handle_leave_event() hides the tooltip if one is shown. That's usually fine and hides the widget's tooltip, but it can happen that another widget managed to show a tooltip after the Leave event was triggered and before it's processed. Thus change handle_leave_event() to only hide the tooltip if it was show by the widget. Fixes the case where this could happen in the flame graph in Profiler when moving the mouse over the tooltip window itself #14852.
This commit is contained in:
parent
becec3578f
commit
2a386c0b50
1 changed files with 2 additions and 1 deletions
|
@ -466,7 +466,8 @@ void Widget::handle_leave_event(Core::Event& event)
|
|||
{
|
||||
if (auto* window = this->window())
|
||||
window->update_cursor({});
|
||||
Application::the()->hide_tooltip();
|
||||
if (Application::the()->tooltip_source_widget() == this)
|
||||
Application::the()->hide_tooltip();
|
||||
leave_event(event);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue