Gtk seems to treat primary selection as the main selection, making text selection impossible if middle click pasting is disabled on Wayland
Summary
Gtk seems to treat primary selection as the main selection, which leads to the issue, that a disabled middle click pasting on KDE Plasma Wayland 5.26+ makes text selection in some GTK apps impossible.
This bug seems to be exposed by https://invent.kde.org/plasma/kwin/-/merge_requests/3012/diffs
Steps to reproduce
- Open one of the following apps:
- GTK Demo 4.8.2
- GTK Widget Factory 4.8.2
- Simple-Scan 42.5
- Virtual Machine Manager 4.1.0
- Gnome Chess 43.0
- HandBrake 1.5.1
- RawTherapee 5.8
- gst-debug-viewer 1.20.4
- Xournal++ 1.1.2
- Gajim 1.5.3
- DeaDBeeF 1.9.3
- Disable Middle Click Pasting in the Workspace KCM of KDE Plasma 5.26+
- Try to select any text by a) press CTRL+A b) select the text manually with the mouse or use your keyboard via shift + arrow-keys c) the context menu "select all"
Observed result
The text becomes selected for a split second and then the selection vanishes. As soon as Middle Click Pasting option is enabled again, the issue is gone.
System setup
- Operating System: openSUSE Tumbleweed 20221104
- GTK Version: 3.24.34 and 4.8.2
- GLib Version: 2.74.0
Additional notes
Downstream bug report: https://bugs.kde.org/show_bug.cgi?id=461498
Edited by A D