[Linux] D&D fails sometimes
Categories
(Core :: Widget: Gtk, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox94 | --- | fixed |
People
(Reporter: stransky, Assigned: stransky)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
text/x-phabricator-request
|
Details |
D&D fails sometimes, especially when Firefox main loop is busy.
Assignee | ||
Comment 1•3 years ago
|
||
It's because we reply to drag_motion callback too late (we reply from scheduled timer event) and Gtk fails to deliver / commit reply to Wayland compositor. We definitely violate D&D protocol here.
Assignee | ||
Comment 2•3 years ago
|
||
Primary cause of this bug is missing reply from drag_motion handler while we're reading data from D&D and routing it to child process.
Wayland/Gtk sets drag state right after drag_motion event only. We're getting 'drag_motion' events from nested loop (while reading data for child process) and we don't know the final D&D state yet as we need reply from the child process. When we set the D&D state latter, it's ignored by Gtk and D&D is considered as canceled by compositor.
Right now we explicitly state 'drag denied' after D&D start until we have a reply from child process. We may change it to 'drag accepted' on Wayland. It does not change final D&D state - we get the data only when child process requests it.
Assignee | ||
Comment 3•3 years ago
|
||
When we get data from D&D operation by nsWindow::OnDragDataReceivedEvent, speed up data transfer to child process by
WindowDragMotionHandler() call.
Assignee | ||
Comment 4•3 years ago
|
||
Wayland/Gtk sets drag state right after drag_motion event only.
While we're reading data for child process we're getting 'drag_motion' events from nested loop.
We don't know the final D&D state yet as we need reply from the child process.
When we set the D&D state latter, it's ignored by Gtk and D&D is considered as
canceled by client.
Right now we explicitly state 'drag denied' after D&D start until we have a reply from child process.
We're changing it to 'drag accepted' on Wayland until we have a reply from child process
and we also send the reply in WindowDragMotionHandler() to fulfill Wayland protocol needs.
It does not change final D&D state - we get the data only when child process requests it.
Comment 6•3 years ago
|
||
Backed out for causing linux bustages on nsWindow.cpp.
Failure log: https://treeherder.mozilla.org/logviewer?job_id=352246192&repo=autoland
Backout link: https://hg.mozilla.org/integration/autoland/rev/49ce22ba1d18270228c9d79317aa28571dfbe2c4
Assignee | ||
Updated•3 years ago
|
Comment 9•3 years ago
|
||
bugherder |
Comment 10•3 years ago
|
||
Backed out along with Bug 1731197 for drag and drop of tabs causing duplicates (Bug 1732116).
backout: https://hg.mozilla.org/mozilla-central/rev/ba378c62cecf6a3048baddde1f9c7d61b45a2914
Assignee | ||
Comment 11•3 years ago
|
||
No need to backout that, a fix is already at Bug 1732116
Comment 12•3 years ago
|
||
Comment 13•3 years ago
|
||
bugherder |
Description
•