https://bugs.kde.org/show_bug.cgi?id=512235
Bug ID: 512235
Summary: wl_data_source.action(0) received after
wl_data_source.dnd_drop_performed()
Classification: Plasma
Product: kwin
Version First unspecified
Reported In:
Platform: Fedora RPMs
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: Wayland drag-and-drop
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
The documentation for the wl_data_source.action event says the following:
> It is only possible to receive this event after
> wl_data_source.dnd_drop_performed if the drag-and-drop operation ended
> in an "ask" action, in which case the final wl_data_source.action event
> will happen immediately before wl_data_source.dnd_finished.
KWin 6.5.2 sends wl_data_source.action(0) soon after
wl_data_source.dnd_drop_performed(). This seems to violate the specification,
since the DnD operation didn't end in an "ask" action (value 4). Previous
set_actions() only sets the allowed actions to (copy | move == value 3).
This doesn't seem to be reproducible on KWin 6.4.5 (Kubuntu 25.10).
STEPS TO REPRODUCE
1. Run kwrite (or any other application) with WAYLAND_DEBUG=1
2. Insert some text into the editor
3. Select a portion of the text, and drag it to a different position in the
document
OBSERVED RESULT
The text is dragged as expected. The Wayland debug log shows the following:
> [1126301.964] {Default Queue} ->
> wl_data_device_manager#12.create_data_source(new id wl_data_source#55)
> [1126301.967] {Default Queue} -> wl_data_source#55.offer("text/plain")
> [1126301.970] {Default Queue} ->
> wl_data_source#55.offer("text/plain;charset=utf-8")
> [1126301.972] {Default Queue} -> wl_data_source#55.set_actions(3)
> [1126301.977] {Default Queue} ->
> wl_data_device#13.start_drag(wl_data_source#55, wl_surface#46, wl_surface#69,
> 18832)
> ...
> [1126830.810] {Default Queue} wl_data_device#13.drop()
> ...
> [1126831.586] {Default Queue} -> wl_data_source#55.destroy()
> [1126831.593] {Default Queue} discarded wl_data_source#55.dnd_drop_performed()
> [1126831.595] {Default Queue} wl_data_device#13.leave()
> [1126831.601] {Default Queue} discarded wl_data_source#55.action(0)
The events are discarded by this specific client, but they are sent. Other
client applications might not discard these events and behave incorrectly.
EXPECTED RESULT
The text is dragged as expected. The Wayland debug log doesn't show anything
strange.
SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 43
KDE Plasma Version: 6.5.2
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Kernel Version: 6.17.7-300.fc43.x86_64 (64-bit)
Graphics Platform: Wayland
ADDITIONAL INFORMATION
Leads to
https://youtrack.jetbrains.com/issue/JBR-9591/Wayland-Drag-Drop-of-highlighted-text-in-the-editor-causes-duplication#focus=Comments-27-12964973.0-0.
The workaround for clients is to ignore wl_data_source.action(0) requests after
wl_data_source.dnd_drop_performed()
--
You are receiving this mail because:
You are watching all bug changes.