Bug 497031 - Firefox download popup drag does not work
Summary: Firefox download popup drag does not work
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: Wayland drag-and-drop (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-04 10:12 UTC by Jonathan Riddell
Modified: 2025-05-31 10:02 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.4.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Riddell 2024-12-04 10:12:44 UTC
Using current Firefox in Ubuntu 24.04/KDE neon unstable and if I download a file the download popup lists it but it can not be dragged anywhere.

This does work under X11.

The debug output suggests the drag is started:

>WAYLAND_DEBUG=1 firefox 2>&1 | grep drag
[4076010.323] {Default Queue} wl_registry#2.global(41, "xdg_toplevel_drag_manager_v1", 1)
[4076102.074] {Default Queue} wl_registry#28.global(41, "xdg_toplevel_drag_manager_v1", 1)
[4076452.357] {Default Queue} wl_registry#45.global(41, "xdg_toplevel_drag_manager_v1", 1)
[4076452.739] {Default Queue} wl_registry#47.global(41, "xdg_toplevel_drag_manager_v1", 1)
[4076462.345] wl_registry#48.global(41, "xdg_toplevel_drag_manager_v1", 1)
[4129970.939] {Default Queue}  -> wl_data_device#22.start_drag(wl_data_source#90, wl_surface#87, wl_surface#68, 16826)
Comment 1 Vlad Zahorodnii 2025-05-27 13:41:58 UTC
It works fine for me. Firefox 138.
Comment 2 Nate Graham 2025-05-28 17:23:18 UTC
I can still reproduce this with current git master and LibreWolf 138.0.4-1, FWIW.
Comment 3 David Edmundson 2025-05-29 10:45:03 UTC
In the download popup I cannot drag a file. 
In 'show all downloads' I can.

Are we all talking about the same place.
Comment 4 Vlad Zahorodnii 2025-05-29 11:11:18 UTC
(In reply to David Edmundson from comment #3)
> In the download popup I cannot drag a file. 
> In 'show all downloads' I can.
> 
> Are we all talking about the same place.

Hmm, I thought that zen browser behaves the same way as FF does. Apparently it does not.

In FF, it's not possible to drag and drop downloads in the popup

In zen, drag and drop _does_ work as expected in the popup. The popup looks identical to the one found in FF
Comment 5 Emilio Cobos Álvarez (:emilio) 2025-05-29 13:21:04 UTC
For context, this still repros, but the reason it "works" in Zen is that if the popup is positioned using xdg-positioner, then it works, and in zen the popup overflows the window by default, so we always do that.

You can make it "work" in Firefox by moving the button to the left of the toolbar, or shrinking the window.
Comment 6 Emilio Cobos Álvarez (:emilio) 2025-05-29 13:37:53 UTC
This seems to work on Mutter and Sway as well, fwiw. And it's not specific about this popup. If I make other popups not use xdg-positioner then drags break the same way.
Comment 7 Bug Janitor Service 2025-05-29 14:20:30 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7705
Comment 8 Vlad Zahorodnii 2025-05-29 15:45:48 UTC
Git commit 40379821ee527ad7666de916f890852578c3a591 by Vlad Zahorodnii.
Committed on 29/05/2025 at 15:31.
Pushed by vladz into branch 'master'.

wayland: Fix focused surface check in wl_data_device.start_drag

SeatInterface::focusedPointerSurface() contains the main surface, but the
client can specify a subsurface.

M  +95   -0    autotests/wayland/client/test_drag_drop.cpp
M  +1    -1    src/wayland/datadevice.cpp
M  +0    -1    src/wayland/seat.cpp

https://invent.kde.org/plasma/kwin/-/commit/40379821ee527ad7666de916f890852578c3a591
Comment 9 Vlad Zahorodnii 2025-05-29 17:44:26 UTC
Git commit 1a6871de0d17c7f65da8b96a703326437d736c17 by Vlad Zahorodnii.
Committed on 29/05/2025 at 16:13.
Pushed by vladz into branch 'Plasma/6.4'.

wayland: Fix focused surface check in wl_data_device.start_drag

SeatInterface::focusedPointerSurface() contains the main surface, but the
client can specify a subsurface.


(cherry picked from commit 40379821ee527ad7666de916f890852578c3a591)

Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>

M  +95   -0    autotests/wayland/client/test_drag_drop.cpp
M  +1    -1    src/wayland/datadevice.cpp
M  +0    -1    src/wayland/seat.cpp

https://invent.kde.org/plasma/kwin/-/commit/1a6871de0d17c7f65da8b96a703326437d736c17