Skip to content

Commit b90c239

Browse files
64-bitmanchrisbra
authored andcommitted
patch 9.1.1485: missing Wayland clipboard support
Problem: missing Wayland clipboard support Solution: make it work (Foxe Chen) fixes: #5157 closes: #17097 Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 0312527 commit b90c239

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+7520
-226
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ jobs:
2929
LOG_DIR: ${{ github.workspace }}/logs
3030
TERM: xterm
3131
DISPLAY: ':99'
32-
WAYLAND_DISPLAY: 'wayland-1'
3332
DEBIAN_FRONTEND: noninteractive
3433

3534
strategy:
@@ -125,6 +124,10 @@ jobs:
125124
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
126125
PKGS=( \
127126
gettext \
127+
x11-utils \
128+
labwc \
129+
wl-clipboard \
130+
wayland-utils \
128131
libgtk-3-dev:${{ matrix.architecture }} \
129132
libgtk-3-bin:${{ matrix.architecture }} \
130133
desktop-file-utils \
@@ -141,7 +144,6 @@ jobs:
141144
libwayland-cursor0:${{ matrix.architecture }} \
142145
locales-all \
143146
software-properties-common \
144-
sway \
145147
)
146148
if ${{ contains(matrix.extra, 'asan') }} && ${{ contains(matrix.architecture, 'native') }}; then
147149
PKGS+=( \
@@ -270,8 +272,6 @@ jobs:
270272
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
271273
sudo usermod -a -G audio "${USER}"
272274
sudo bash ci/setup-xvfb.sh
273-
# Sway requires user session
274-
bash ci/setup-sway.sh
275275
276276
- name: Check autoconf
277277
if: contains(matrix.extra, 'unittests')

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ src/auto/osdef.h
2222
src/auto/link.log
2323
src/auto/link.sed
2424
src/auto/pathdef.c
25+
src/auto/wayland/*.c
26+
src/auto/wayland/*.h
2527

2628
# Windows
2729
*.exe

.hgignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ src/auto/osdef.h
2424
src/auto/link.log
2525
src/auto/link.sed
2626
src/auto/pathdef.c
27+
src/auto/wayland/*.c
28+
src/auto/wayland/*.h
2729

2830
# Windows
2931
*.exe

Filelist

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ SRC_ALL = \
241241
src/testdir/ru_RU/LC_MESSAGES/Makefile \
242242
src/testdir/ru_RU/LC_MESSAGES/__PACKAGE__.po \
243243
src/testdir/ru_RU/LC_MESSAGES/__PACKAGE__.mo \
244+
src/testdir/window_manager.vim \
244245
src/proto.h \
245246
src/protodef.h \
246247
src/proto/alloc.pro \
@@ -490,6 +491,12 @@ SRC_UNIX = \
490491
src/gui_xmebwp.h \
491492
src/gui_x11.c \
492493
src/gui_x11_pm.h \
494+
src/auto/wayland/README.txt \
495+
src/auto/wayland/Makefile \
496+
src/auto/wayland/protocols/ext-data-control-v1.xml \
497+
src/auto/wayland/protocols/wlr-data-control-unstable-v1.xml \
498+
src/auto/wayland/protocols/xdg-shell.xml \
499+
src/auto/wayland/protocols/primary-selection-unstable-v1.xml \
493500
src/if_xcmdsrv.c \
494501
src/link.sh \
495502
src/installman.sh \
@@ -508,6 +515,7 @@ SRC_UNIX = \
508515
src/proto/gui_motif.pro \
509516
src/proto/gui_xmdlg.pro \
510517
src/proto/gui_x11.pro \
518+
src/proto/wayland.pro \
511519
src/proto/if_xcmdsrv.pro \
512520
src/proto/os_unix.pro \
513521
src/proto/pty.pro \
@@ -519,7 +527,9 @@ SRC_UNIX = \
519527
src/vim_mask.xbm \
520528
src/vimtutor \
521529
src/gvimtutor \
530+
src/wayland.c \
522531
src/which.sh \
532+
src/gen-wayland-protocols.sh \
523533
src/xxd/Makefile \
524534

525535
# Source files for both MS Windows and Unix-like.

ci/setup-sway.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

runtime/doc/Make_all.mak

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ DOCS = \
153153
vim9class.txt \
154154
visual.txt \
155155
vietnamese.txt \
156+
wayland.txt \
156157
windows.txt \
157158
workshop.txt
158159

@@ -309,6 +310,7 @@ HTMLS = \
309310
vim9.html \
310311
vim9class.html \
311312
visual.html \
313+
wayland.html \
312314
windows.html \
313315
workshop.html
314316

runtime/doc/builtin.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim version 9.1. Last change: 2025 Jun 23
1+
*builtin.txt* For Vim version 9.1. Last change: 2025 Jun 27
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -13038,6 +13038,8 @@ vms VMS version of Vim.
1303813038
vreplace Compiled with |gR| and |gr| commands. (always true)
1303913039
vtp Compiled for vcon support |+vtp| (check vcon to find
1304013040
out if it works in the current console).
13041+
wayland Compiled with Wayland protocol support.
13042+
wayland_clipboard Compiled with support for Wayland selections/clipboard
1304113043
wildignore Compiled with 'wildignore' option.
1304213044
wildmenu Compiled with 'wildmenu' option.
1304313045
win16 old version for MS-Windows 3.1 (always false)

runtime/doc/eval.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 9.1. Last change: 2025 Jun 04
1+
*eval.txt* For Vim version 9.1. Last change: 2025 Jun 27
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2240,6 +2240,15 @@ v:charconvert_to
22402240
The name of the character encoding of a file after conversion.
22412241
Only valid while evaluating the 'charconvert' option.
22422242

2243+
*v:clipmethod*
2244+
v:clipmethod The current method of accessing the clipboard that is being
2245+
used. Can either have the value of:
2246+
wayland The Wayland protocol is being used.
2247+
x11 X11 selections are being used.
2248+
none The above methods are unavailable
2249+
or cannot be used.
2250+
See 'clipmethod' for more details.
2251+
22432252
*v:cmdarg* *cmdarg-variable*
22442253
v:cmdarg This variable is used for two purposes:
22452254
1. The extra arguments given to a file read/write command.
@@ -2969,6 +2978,12 @@ v:vim_did_enter Zero until most of startup is done. It is set to one just
29692978
*v:warningmsg* *warningmsg-variable*
29702979
v:warningmsg Last given warning message. It's allowed to set this variable.
29712980

2981+
*v:wayland_display*
2982+
v:wayland_display
2983+
The name of the Wayland display that Vim is connected to.
2984+
Equivalent to the $WAYLAND_DISPLAY environment variable.
2985+
If this is empty, then Vim is not connected to any display.
2986+
29722987
*v:windowid* *windowid-variable*
29732988
v:windowid When any X11/Wayland based GUI is running or when running in a
29742989
terminal and Vim connects to the X server (|-X|) this will be

runtime/doc/help.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*help.txt* For Vim version 9.1. Last change: 2024 Dec 06
1+
*help.txt* For Vim version 9.1. Last change: 2025 Jun 27
22

33
VIM - main help file
44
k
@@ -187,6 +187,9 @@ GUI ~
187187
|gui_w32.txt| Win32 GUI
188188
|gui_x11.txt| X11 GUI
189189

190+
System Integration ~
191+
|wayland.txt| Wayland protocol support
192+
190193
Interfaces ~
191194
|if_cscop.txt| using Cscope with Vim
192195
|if_lua.txt| Lua interface

runtime/doc/index.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*index.txt* For Vim version 9.1. Last change: 2025 Jun 23
1+
*index.txt* For Vim version 9.1. Last change: 2025 Jun 27
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1587,6 +1587,7 @@ tag command action ~
15871587
|:redrawtabpanel| :redrawtabp[anel] force a redraw of the tabpanel
15881588
|:registers| :reg[isters] display the contents of registers
15891589
|:resize| :res[ize] change current window height
1590+
|:clipreset| :clip[reset] reset 'clipmethod'
15901591
|:retab| :ret[ab] change tab size
15911592
|:return| :retu[rn] return from a user function
15921593
|:rewind| :rew[ind] go to the first file in the argument list
@@ -1777,6 +1778,7 @@ tag command action ~
17771778
|:winsize| :wi[nsize] get or set window size (obsolete)
17781779
|:wincmd| :winc[md] execute a Window (CTRL-W) command
17791780
|:winpos| :winp[os] get or set window position
1781+
|:wlrestore| :wl[restore] restore the Wayland compositor connection
17801782
|:wnext| :wn[ext] write to a file and go to next file in
17811783
argument list
17821784
|:wprevious| :wp[revious] write to a file and go to previous file in

0 commit comments

Comments
 (0)