I’ve just noticed a weird issue here. I wonder if anyone can shed some light on it. I’m quite sure it’s related to the various clipboards that X11 and Wayland have, but it’s inconsistent and so confuses me. Here’s what I’m seeing:
write some text
yank (copy) the text to the system clipboard using "+y (or select using the mouse and copy using Edit > Copy in Gvim).
try to paste the text (ctrl v) in gedit - it works
try to paste the text in Qutebrowser or Falkon (both Qt applications) - it does not work.
Vim uses the X11 clipboard from what I can find. So the yanked text goes to this clipboard, which is fine. But, why is it that gedit can access it but Qutebrowser/Falkon cannot?
Further, if I use something like wl-copy to add something to the Wayland clipboard, it is available everywhere—gedit, gvim, Qutebrowser. So, the wayland clipboard also updates the X11 one, but the X11 does not update the wayland one—is that what is happening here?
The “or” part here actually makes this way weirder. GNOME Terminal (and afaik all GTK terminals) use the Wayland APIs for clipboard management. So, this basically means that this isn’t working regardless of whether it’s copied from Wayland or Xorg…
Out of curiosity:
Can you reproduce this issue with any other apps?
Related to what @qulogic said, what do you see if you try pasting via both wl-paste and xclip/xsel? Are they identical results, or do xclip/xsel not work?
If you copy from a Qt application, can it paste elsewhere?
Can it be a bug in gVim? It can be using some X11-specific commands/calls instead of using more generic ones (as more modern applications do) which are correctly synced between X11 and Wayland registers?
Yes, I think that is the case. Instead of using the cliboard mechanism provided by Gtk (or whatever), I think Vim specifically works with the X11 bits. So, it does not take advantage of the X11-Wayland clipboard sync that Gtk does for the applications?
I couldn’t find anything. I’ve ensured that it isn’t my vim settings by running gvim as so: gvim -u NONE (this runs without any vimrc settings). There’s nothing in my bashrc either. I couldn’t find any related settings in dconf-editor and i don’t know where to begin looking for Qt related settings…
Waaaiiitt! I take this back. The new user was running Gnome-shell under Xorg. When I logged in using the default (Wayland), the issue also persists in the new user. So it is not limited to my user only.
I’ve checked, I’m in a wayland session, and it worked for me.
Watched the video, can you test the same, but instead of closing gedit just remove the selection – so that there isn’t any selected text in gedit?
If it’s still clears the clipboard (or rather selection buffer) – then I believe that’s by design.
I’ve read X11 has two buffers: selection buffer that contains just the currently selected text. This is used traditionally with middle-click to paste.
And the second one is more traditional clipboard (so to say) used with Ctrl-C / Ctrl-V and/or Ctrl-Insert / Shift-Insert. As I’ve said several posts before, it turns out xterm doesn’t support clipboard’s copy/paste, only more traditional (legacy?) text selection buffer.
Behavior you demonstrated in your video correspond to this text selection buffer containing something or being empty.
No worries—I was really beginning to think of a fresh install here, so knowing that it’s probably a regression helps. I’l writing to the test mailing list now. Let’s hope this is either a known issue or one that needs fixing.
In the meantime, if anyone is running F31, please feel free to test the issue and make suggestions.