[vim/vim] Removing Wayland clipboard focus stealing code (Issue #18795)

21 views
Skip to first unread message

Foxe Chen

unread,
Nov 21, 2025, 7:29:32 PM11/21/25
to vim/vim, Subscribed
64-bitman created an issue (vim/vim#18795)

Unless there are people using this feature and verify that it works, I think we should remove it since its just a burden. With OSC 52 support in the works, accessing the clipboard in GNOME environments should be fine (VTE terminals dont support it, but Ghostty does and its fully GTK so...). The tests on my machine for the focus stealing code don't seem to pass + we can't really test it in a CI environment since it requires certain capabilities on seats. Overall this is pretty much a broken feature in my eyes. Thoughts?


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18795@github.com>

Foxe Chen

unread,
Nov 23, 2025, 2:19:51 PM11/23/25
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#18795)

@chrisbra thoughts?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18795/3568256872@github.com>

Christian Brabandt

unread,
Nov 23, 2025, 2:57:15 PM11/23/25
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18795)

I thought this was added to work around a limitation where it was not possible for wayland to copy from a different window? Is this no longer an issue then?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18795/3568282456@github.com>

Foxe Chen

unread,
Nov 23, 2025, 3:00:52 PM11/23/25
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#18795)

I thought this was added to work around a limitation where it was not possible for wayland to copy from a different window? Is this no longer an issue then?

I'm not sure what you mean by "copy from a different window", but this was added mainly for GNOME environments (Mutter compositor), since it doesn't support the protocols needed to directly access the clipboard. However with OSC 52 in the works, I mostly don't see the benefit of keeping this workaround (it would remove a lot of complexity, possibly unoticed bugs), when a user (in the future) can just use a terminal with OSC 52 support.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18795/3568284833@github.com>

Christian Brabandt

unread,
Nov 23, 2025, 3:20:37 PM11/23/25
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18795)

okay fine then


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18795/3568300321@github.com>

dezza

unread,
Feb 24, 2026, 10:13:49 AMFeb 24
to vim/vim, Subscribed
dezza left a comment (vim/vim#18795)

Related (but indirectly): @64-bitman. Is it correct understood +wayland and +wayland_clipboard is really only for tui vim and no more protocols are planned?

Since the (only) wayland gui (gtk3) has its own wayland compositor and this code is not active during gvim- is it clear enough from naming?

I learnt from the code, but I could see someone being confused if running gvim in wayland, but version said -wayland -wayland_clipboard in red.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18795/3952789917@github.com>

Foxe Chen

unread,
Feb 24, 2026, 10:16:49 AMFeb 24
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#18795)

Related (but indirectly): @64-bitman. Is it correct understood +wayland and +wayland_clipboard is really only for tui vim and no more protocols are planned?

Since the (only) wayland gui (gtk3) has its own wayland compositor and this code is not active during gvim- is it clear enough from naming?

I learnt from the code, but I could see someone being confused if running gvim in wayland, but version said -wayland -wayland_clipboard in red.

Yes it is only for the tui. As for protocols, if any relevant ones becoming mainstream, then i will try adding support for it.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18795/3952826971@github.com>

Sami Farin

unread,
Apr 13, 2026, 7:44:05 AMApr 13
to vim/vim, Subscribed
Safari77 left a comment (vim/vim#18795)

Just remove the focus stealing hack. It does not even work without X11 when running gnome 49 gnome-shell --no-x11.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18795/4236102651@github.com>

dezza

unread,
Apr 13, 2026, 7:48:07 AMApr 13
to vim/vim, Subscribed
dezza left a comment (vim/vim#18795)

@Safari77 cuz you use gnome, please confirm for me if maximizing gvim under X11 GDK_BACKEND=x11 gvim results in a loop of resizing/glitching. I asked 2 people with a real Xorg worked as expected in old as well as new version. I think there might be a gnome specific issue there, it only happened to me on Fedora.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18795/4236126438@github.com>

Sami Farin

unread,
Apr 13, 2026, 7:55:49 AMApr 13
to vim/vim, Subscribed
Safari77 left a comment (vim/vim#18795)

Maybe somebody else could try that, I do not have X11 currently running :)


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18795/4236168560@github.com>

dezza

unread,
Apr 13, 2026, 7:57:47 AMApr 13
to vim/vim, Subscribed
dezza left a comment (vim/vim#18795)

@Safari77 this would use xwayland under GNOME which was where I reproduced it.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18795/4236179351@github.com>

mattn

unread,
Apr 15, 2026, 1:00:38 PMApr 15
to vim/vim, Subscribed
mattn left a comment (vim/vim#18795)

Related issue #19815

I plan to remove X11 dependencies for GTK4 GUI.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18795/4253938475@github.com>

Reply all
Reply to author
Forward
0 new messages