Skip to content

Commit 03154a0

Browse files
authored
back/wayland: build the X11 pasteboard owner into gpbs (#161)
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.
1 parent b037ebf commit 03154a0

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Tools/GNUmakefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ gpbs_C_FILES += xdnd.c
5454
endif
5555
endif
5656

57+
# The wayland backend has no pasteboard owner of its own, so build the X11
58+
# owner into gpbs when X11 is available; it reaches the desktop clipboard
59+
# through XWayland. Without X11 gpbs stays an internal-only pasteboard.
60+
ifeq ($(BUILD_SERVER),wayland)
61+
ifneq ($(findstring -lX11,$(GRAPHIC_LIBS)),)
62+
gpbs_OBJC_FILES += xpbs.m
63+
ifeq ($(BACKEND_BUNDLE),yes)
64+
gpbs_C_FILES += xdnd.c
65+
endif
66+
endif
67+
endif
68+
5769
ifeq ($(BUILD_SERVER),win32)
5870
gpbs_OBJC_FILES += win32pbs.m
5971
endif

0 commit comments

Comments
 (0)