Skip to content

back/wayland: build the X11 pasteboard owner into gpbs#161

Open
DTW-Thalion wants to merge 1 commit into
gnustep:masterfrom
DTW-Thalion:fix/wayland-gpbs-clipboard
Open

back/wayland: build the X11 pasteboard owner into gpbs#161
DTW-Thalion wants to merge 1 commit into
gnustep:masterfrom
DTW-Thalion:fix/wayland-gpbs-clipboard

Conversation

@DTW-Thalion

Copy link
Copy Markdown
Contributor

Closes #71.

gpbs selects XPbOwner as its pasteboard owner on every platform except Windows, but xpbs.m, which defines that class, was compiled only for the x11 server. A wayland build therefore produced a gpbs with no pasteboard owner, so NSPasteboard was disconnected from the desktop clipboard and paste was disabled in GNUstep applications.

Compile xpbs.m and xdnd.c into gpbs for a wayland build when X11 is available, so the X11 owner reaches the desktop clipboard through XWayland. Guarding on X11 (rather than an unconditional x11 wayland filter) keeps a wayland build without X11 unchanged, since configure does not require X11 for the wayland server.

Verified on a wayland session: after wl-copy, an NSPasteboard probe reads the copied text through the wayland-built gpbs (both the wayland-native and X clipboard paths bridge via XWayland).

Thanks to @danjboyd for the diagnosis and the reproduction.

gpbs selects XPbOwner as its pasteboard owner on every platform except
Windows, but xpbs.m, which defines that class, was only compiled for the
x11 server.  A wayland build therefore produced a gpbs with no pasteboard
owner, so NSPasteboard was disconnected from the desktop clipboard and
paste was disabled in GNUstep applications.

Compile xpbs.m and xdnd.c into gpbs for a wayland build when X11 is
available, so the X11 owner reaches the desktop clipboard through XWayland.
Guarding on X11 keeps a wayland build without X11 unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Wayland build of gpbs omits xpbs.m and leaves NSPasteboard disconnected from the system clipboard

1 participant