https://bugs.kde.org/show_bug.cgi?id=395366

            Bug ID: 395366
           Summary: Copying from GTK applications in Wayland does not work
           Product: frameworks-kwayland
           Version: 5.45.0
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: server
          Assignee: mgraess...@kde.org
          Reporter: michal...@gmail.com
  Target Milestone: ---

Created attachment 113311
  --> https://bugs.kde.org/attachment.cgi?id=113311&action=edit
Do not cancel old clipboard selection if it is same as the new one.

In Plasma Wayland session if I start kate and gedit, I can copy-paste from kate
into kate and from kate into gedit, but not from gedit into anywhere else.
Pressing CTRL+C in gedit seems to empty the clipboard and CTRL+V then pastes
nothing.

When testing, make sure to run both kate and gedit in Wayland mode, not in X
mode under Xwayland. It can be ensured for example by starting them like this:

> unset DISPLAY
> QT_QPA_PLATFORM=wayland kate &
> GDK_BACKEND=wayland gedit &


If I try the same thing in Gnome Wayland or in Weston, copy and paste works
between kate and gedit in all directions.

If I run gedit in X mode, copy paste works normally between it and kate in
Wayland mode.

I have checked the output of kwin using WAYLAND_DEBUG=1 and the issue is that
gedit calls `wl_data_device::set_selection` multiple times with the same
`wl_data_source`. In kwayland it gets into
`DataDeviceInterface::Private::setSelection` which sees that there is existing
selection, so it cancels it before accepting the new one. But since the new is
the same as the old one, it cancels them "both".

I made patch that prevents the cancellation if the new selection is the same as
the old one. Copying works again with that patch.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to