Closed Bug 1731197 Opened 3 years ago Closed 3 years ago

[Linux] Don't query missing D&D targets

Categories

(Core :: Widget: Gtk, defect)

defect

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: stransky, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Don't query missing D&D targets - it wastes resources and makes D&D longer.

Right now we query all MIME data types during D&D operation and rely on Gtk to filter out
missing ones. It leads to possible D&D failures as we can't process D&D events
from Gtk during it.

This patch does:

  • Query MIME types available for D&D transfer by nsDragService::GetDragFlavors().
  • Quit early at nsDragService::GetTargetDragData() when requested MIME can't be transferred by D&D.
  • Use gdk_drag_context_get_suggested_action() instead of gdk_drag_context_get_actions().
  • Check mTargetWindow before we use it.
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/f213f078a6d2 [Linux] Make D&D operations more reliable and transfer only available D&D data types, r=emilio
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
Regressions: 1732116
Regressions: 1732262
Regressions: 1732086

Backed out along with Bug 1730203 for drag and drop of tabs causing duplicates (Bug 1732116).

backout: https://hg.mozilla.org/mozilla-central/rev/ba378c62cecf6a3048baddde1f9c7d61b45a2914

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 94 Branch → ---

(In reply to Natalia Csoregi [:nataliaCs] from comment #4)

Backed out along with Bug 1730203 for drag and drop of tabs causing duplicates (Bug 1732116).

backout: https://hg.mozilla.org/mozilla-central/rev/ba378c62cecf6a3048baddde1f9c7d61b45a2914

No need to backout that, a fix is already at Bug 1732116.

Flags: needinfo?(stransky)
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/dfa8def98594 [Linux] Make D&D operations more reliable and transfer only available D&D data types, r=emilio

(In reply to Martin Stránský [:stransky] (ni? me) from comment #5)

No need to backout that, a fix is already at Bug 1732116.

The fix was still pending review and we needed to ship a fixed Nightly asap.

Martin, I've noticed that copying and pasting images in Telegram chats has stopped working reliably around the same time. Could it be related to one of these recent changes?

Flags: needinfo?(stransky)
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch

(In reply to Marco Castelluccio [:marco] from comment #8)

Martin, I've noticed that copying and pasting images in Telegram chats has stopped working reliably around the same time. Could it be related to one of these recent changes?

This is about D&D only. Please file a new bug for copy/paste bug. Do you use Wayland or X11?

Flags: needinfo?(stransky)

Yeah, I filed bug 1732681.

Summary: [Linux] Don't query missing D&D targtes → [Linux] Don't query missing D&D targets
Regressions: 1735571
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: