diff options
author | Andreas Kling <kling@serenityos.org> | 2021-01-09 12:01:23 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-09 12:02:07 +0100 |
commit | 5f364f5dc1067ee720b1e333a06ca2184bfe5252 (patch) | |
tree | 790ec8fd1889c68c9a3a346d417635bb7fbe77e5 /Libraries/LibGUI/Window.cpp | |
parent | 9e60fc5006685d0e802788c7db592e3671f135a4 (diff) | |
download | serenity-5f364f5dc1067ee720b1e333a06ca2184bfe5252.zip |
LibGUI: Clear the application's drag-hovered widget on drop event
When we drop something on any window, there's no longer an ongoing drag
so let's forget the drag-hovered widget.
Diffstat (limited to 'Libraries/LibGUI/Window.cpp')
-rw-r--r-- | Libraries/LibGUI/Window.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Libraries/LibGUI/Window.cpp b/Libraries/LibGUI/Window.cpp index ac4aa36001..353997a224 100644 --- a/Libraries/LibGUI/Window.cpp +++ b/Libraries/LibGUI/Window.cpp @@ -280,7 +280,9 @@ void Window::handle_drop_event(DropEvent& event) auto result = m_main_widget->hit_test(event.position()); auto local_event = make<DropEvent>(result.local_position, event.text(), event.mime_data()); ASSERT(result.widget); - return result.widget->dispatch_event(*local_event, this); + result.widget->dispatch_event(*local_event, this); + + Application::the()->set_drag_hovered_widget({}, nullptr); } void Window::handle_mouse_event(MouseEvent& event) |