mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibGUI: Prevent multiple drag initiations while drag messages are passed
This commit is contained in:
committed by
Andreas Kling
parent
e99c2261e3
commit
a2cfb7eb94
@@ -288,6 +288,14 @@ void AbstractView::mousemove_event(MouseEvent& event)
|
||||
|
||||
ASSERT(!data_type.is_null());
|
||||
|
||||
if (m_is_dragging)
|
||||
return;
|
||||
|
||||
// An event might sneak in between us constructing the drag operation and the
|
||||
// event loop exec at the end of `drag_operation->exec()' if the user is fast enough.
|
||||
// Prevent this by just ignoring later drag initiations (until the current drag operation ends).
|
||||
TemporaryChange dragging { m_is_dragging, true };
|
||||
|
||||
dbg() << "Initiate drag!";
|
||||
auto drag_operation = DragOperation::construct();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user