1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 17:35:08 +00:00

WindowServer+LibGUI: Notify hovered window when drag&drop is cancelled

The hovered window may want to react to a drag being cancelled, even
if the drag originated in some other window.
This commit is contained in:
Andreas Kling 2021-01-08 23:47:53 +01:00
parent 9acb72e804
commit c17fa67f51
2 changed files with 9 additions and 2 deletions

View file

@ -98,8 +98,8 @@ void DragOperation::notify_accepted(Badge<WindowServerConnection>)
void DragOperation::notify_cancelled(Badge<WindowServerConnection>)
{
ASSERT(s_current_drag_operation);
s_current_drag_operation->done(Outcome::Cancelled);
if (s_current_drag_operation)
s_current_drag_operation->done(Outcome::Cancelled);
}
void DragOperation::set_text(const String& text)