Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e6abefe
Initial Support for OpenGL on Wayland.
DMJC Apr 18, 2026
cf577bf
wayland: rebind OpenGL context when view gets a window
DMJC Apr 18, 2026
396b42b
wayland: avoid noisy GL attach failures and fix retain leak
DMJC Apr 18, 2026
95b7be7
Implemented OpenGL Support on Wayland.
DMJC Apr 19, 2026
cc3eeb8
Mouse Crash fix for Wayland backend.
DMJC Apr 19, 2026
7e146cc
Mouse Fix.
DMJC Apr 19, 2026
f392eba
OpenGL is Fixed on Wayland.
DMJC Apr 30, 2026
eaed951
Merge pull request #3 from DMJC/codex/fix-opengl-view-display-on-wayland
DMJC Apr 30, 2026
124da4b
Updates to Popup Menu Handling.
DMJC May 14, 2026
36696d9
Merge branch 'master' of https://github.com/DMJC/libs-back into HEAD
DMJC May 14, 2026
bce6077
Add phased implementation plan for Wayland feature parity
DMJC May 14, 2026
5bb574a
Merge pull request #4 from DMJC/codex/compare-wayland-and-x11-drivers
DMJC May 14, 2026
3b9127e
Change Wayland compositor in integration harness script
DMJC May 14, 2026
82cdb41
Wayland M0+M1: debug categories, smoke harness, inter-process DnD
DMJC May 14, 2026
5e48706
Wayland M2: IME/preedit via zwp_text_input_v3
DMJC May 15, 2026
2accc8b
Wayland M3: extra mouse buttons + per-frame scroll accumulation
DMJC May 15, 2026
3678c91
Wayland M4: output hotplug, scale/geometry reconfiguration
DMJC May 15, 2026
86fbdf5
Wayland M5: buffer lifecycle hardening, surface destruction ordering
DMJC May 15, 2026
6c92dea
smoke-test: extend harness to M5 (buffer lifecycle + stability checks)
DMJC May 15, 2026
2dfab9c
fix: add wl_seat.name handler to prevent SIGABRT on startup
DMJC May 15, 2026
9a35124
fix: fill all wl_pointer and wl_seat listener slots to prevent SIGABRT
DMJC May 15, 2026
792ea6e
fix: in-process drag-and-drop broken in GNUstep apps (Gorm et al.)
DMJC May 15, 2026
f3e5a52
fix: correct mouse tracking over OpenGL subsurfaces with multiple GL …
DMJC May 15, 2026
27a4294
ChangeLog: add entries for all Wayland and Opal commits since 2025-12-18
DMJC May 16, 2026
e7749d9
Merge branch 'master' into wayland/feature-parity-m0-m5
DMJC May 16, 2026
547e69f
Delete wayland_x11_feature_gap_report.md
DMJC May 16, 2026
c204487
Delete wayland_feature_implementation_plan.md
DMJC May 16, 2026
c493cf7
Delete Tools/wayland-smoke-test.sh
DMJC May 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,815 changes: 1,815 additions & 0 deletions $GNUSTEP_MAKEFILES/config.guess

Large diffs are not rendered by default.

2,354 changes: 2,354 additions & 0 deletions $GNUSTEP_MAKEFILES/config.sub

Large diffs are not rendered by default.

189 changes: 189 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,195 @@
* configure
* configure.ac: Autoupdate and autoconf.

2026-05-15 James Carthew <jcarthew@gmail.com>

* Headers/wayland/WaylandOpenGL.h:
* Headers/wayland/WaylandServer.h:
* Source/wayland/WaylandDragView.m:
* Source/wayland/WaylandGLContext.m:
* Source/wayland/WaylandServer+Cursor.m:
* Source/wayland/WaylandServer+Keyboard.m:
* Source/wayland/WaylandServer.m:
Wayland: fix mouse tracking over OpenGL subsurfaces with multiple GL
views. Replace per-window subsurface offset with a per-surface
wl_surface_binding stored as wl_surface user data so each
WaylandGLContext has independent offset tracking.
pointer_handle_enter reads the offset via surface_get_offset() and
stores it in pointer.focus_offset_x/y; pointer_handle_motion applies
the stored offset for correct parent-window coordinate translation.
Folds in the keyboard_handle_enter NULL-surface guard.

* Source/wayland/WaylandDragView.m:
Wayland: fix in-process drag-and-drop in GNUstep applications.
postDragEvent: was discarding all events except NSLeftMouseUp once
the Wayland data device was available; pass NSAppKitDefined events
through to super so in-process draggingEntered:/draggingUpdated:/
performDragOperation: callbacks reach the target view. Fix
device_enter/motion/leave to skip same-process re-posting.

* Source/wayland/WaylandServer+Cursor.m:
Wayland: fill all wl_pointer_listener slots to prevent SIGABRT.
wayland-client 1.24 defines 11 event slots; add no-op stubs for
frame, axis_source, axis_stop, and axis_discrete handlers.

* Source/wayland/WaylandServer+Seat.m:
Wayland: add wl_seat.name handler to prevent SIGABRT on startup.
Bumping the seat binding to v5 causes wl_seat.name to be delivered
during the initial roundtrip. Add seat_handle_name stub so
libwayland does not abort on a NULL dispatcher slot.

* Tools/wayland-smoke-test.sh:
Wayland: extend smoke-test harness to Milestone 5 (buffer lifecycle
and stability checks).

* Headers/cairo/WaylandCairoShmSurface.h:
* Source/cairo/WaylandCairoShmSurface.m:
* Source/wayland/WaylandServer+Xdgshell.m:
* Source/wayland/WaylandServer.m:
Wayland M5: buffer lifecycle hardening and surface destruction
ordering. Add needs_repaint flag and owner back-pointers to
pool_buffer. Fix FD leak in finishBuffer. Re-attach buffers on
compositor release when a repaint is pending. Guard against size
mismatch and destroyed surfaces in the release callback.

* Headers/wayland/WaylandServer.h:
* Source/wayland/WaylandServer+Output.m:
* Source/wayland/WaylandServer.m:
Wayland M4: output hotplug and scale/geometry reconfiguration. Add
effective_width/height, name, description, and configured fields to
struct output. Rewrite output_listener: recompute logical dimensions
for scale and rotation, clamp windows to new bounds, and post
NSApplicationDidChangeScreenParametersNotification. Bind wl_output
at version 4.

* Headers/wayland/WaylandServer.h:
* Source/wayland/WaylandServer+Cursor.m:
* Source/wayland/WaylandServer.m:
Wayland M3: extra mouse buttons and per-frame scroll accumulation.
Map BTN_SIDE/EXTRA/FORWARD/BACK/TASK to NSOtherMouseDown/Up. Fix
buttonNumber to use button-BTN_LEFT offset. Bump wl_seat to v5 and
accumulate axis deltas per compositor frame before dispatching a
single NSScrollWheel event.

* Headers/wayland/WaylandInputServer.h:
* Headers/wayland/WaylandServer.h:
* Source/wayland/GNUmakefile:
* Source/wayland/WaylandInputServer.m:
* Source/wayland/WaylandServer+Keyboard.m:
* Source/wayland/WaylandServer.m:
* Source/wayland/text-input-unstable-v3-protocol.c:
Wayland M2: IME/preedit support via zwp_text_input_v3. Generate and
wire text-input-unstable-v3 protocol. Fix XKB UTF-8 conversion by
replacing the broken &sym cast with xkb_state_key_get_utf8. Add
WaylandInputServer for preedit spot/rect management. Bind
text_input_manager and create zwp_text_input_v3 from the seat.

* Headers/wayland/WaylandDragView.h:
* Headers/wayland/WaylandServer.h:
* Source/cairo/WaylandCairoShmSurface.m:
* Source/wayland/WaylandDragView.m:
* Source/wayland/WaylandInputServer.m:
* Source/wayland/WaylandServer+Cursor.m:
* Source/wayland/WaylandServer+Keyboard.m:
* Source/wayland/WaylandServer+Output.m:
* Source/wayland/WaylandServer.m:
* Tools/wayland-smoke-test.sh:
Wayland M0+M1: add targeted debug log categories and inter-process
DnD. Replace bare NSDebugLog with NSDebugMLLog/NSDebugFLLog across
Wayland sources (categories: WaylandDnD, WaylandIME, WaylandPointer,
WaylandScroll, WaylandOutput). Add Tools/wayland-smoke-test.sh
integration harness. Implement inter-process drag-and-drop via
wl_data_device: bind data_device_manager, wire source/offer
listeners, implement draggingSourceOperationMask,
addDragTypes:toWindow:, and performDragOperation:.

* Headers/wayland/WaylandServer.h:
* Source/wayland/GNUmakefile:
* Source/wayland/WaylandServer+Cursor.m:
* Source/wayland/WaylandServer+Xdgshell.m:
* Source/wayland/WaylandServer.m:
Wayland: update popup menu handling; add xdg-decoration-unstable-v1
protocol support for server-side window decorations.

2026-04-30 Joe Maloney <jpm820@gmail.com>

* Headers/opal/OpalSurface.h:
* Source/opal/OpalContext.m:
* Source/opal/OpalFontInfo.m:
* Source/opal/OpalGState.m:
* Source/opal/OpalSurface.m:
Opal backend: restore functionality. Fix font hinting, gradients,
blend modes, gray-to-RGB colour conversion, and lazy surface
creation. Fix window movement trails by flushing backing and X11
contexts in handleExposeRect. Make X11 surface attachment
self-contained.

2026-04-30 James Carthew <jcarthew@gmail.com>

* Headers/wayland/WaylandDragView.h:
* Headers/wayland/WaylandInputServer.h:
* Headers/wayland/WaylandOpenGL.h:
* Headers/wayland/WaylandServer.h:
* Source/wayland/GNUmakefile:
* Source/wayland/WaylandDragView.m:
* Source/wayland/WaylandGLContext.m:
* Source/wayland/WaylandGLPixelFormat.m:
* Source/wayland/WaylandInputServer.m:
* Source/wayland/WaylandServer+Keyboard.m:
* Source/wayland/WaylandServer+Xdgshell.m:
* Source/wayland/WaylandServer.m:
Wayland: complete OpenGL subsurface integration. Use wl_subsurface
to host GL views, implement frame callbacks and damage tracking, fix
context sharing, and integrate WaylandInputServer for input method
support alongside GL contexts.

2026-04-20 James Carthew <jcarthew@gmail.com>

* Source/wayland/WaylandServer+Cursor.m:
Wayland: fix cursor handling when moving between GL subsurfaces and
main window surfaces.

2026-04-19 James Carthew <jcarthew@gmail.com>

* Source/wayland/WaylandGLContext.m:
* Source/wayland/WaylandServer+Cursor.m:
Wayland: fix crash in cursor handling when the pointer enters a GL
subsurface.

* Headers/wayland/WaylandOpenGL.h:
* Headers/wayland/WaylandServer.h:
* Source/GNUmakefile.preamble:
* Source/wayland/GNUmakefile.preamble:
* Source/wayland/WaylandGLContext.m:
* Source/wayland/WaylandServer.m:
Wayland: complete OpenGL context implementation. Add EGL surface
creation on wl_subsurface, frame-callback-driven buffer swap, and
usesOpenGL tracking in struct window.

2026-04-18 James Carthew <jcarthew@gmail.com>

* Source/wayland/WaylandGLContext.m:
Wayland: fix noisy GL attach failures on unmapped surfaces; plug a
retain-count leak on early error paths in WaylandGLContext.

* Source/wayland/WaylandGLContext.m:
Wayland: rebind OpenGL context to the correct native window when a
view is reparented before makeCurrentContext is called.

* Headers/wayland/WaylandOpenGL.h:
* Headers/wayland/WaylandServer.h:
* Source/GNUmakefile.preamble:
* Source/wayland/GNUmakefile:
* Source/wayland/GNUmakefile.preamble:
* Source/wayland/WaylandGLContext.m:
* Source/wayland/WaylandGLPixelFormat.m:
* Source/wayland/WaylandServer.m:
* configure.ac:
Wayland: initial OpenGL support via EGL and wl_subsurface. Add new
WaylandGLContext and WaylandGLPixelFormat classes implementing
NSOpenGLContext/NSOpenGLPixelFormat for the Wayland backend. Link
against libGL, libEGL, and libwayland-egl.

2025-12-18 Richard Frith-Macdonald <rfm@gnu.org>

* Source/x11/XGServer.m:
Expand Down
10 changes: 10 additions & 0 deletions Headers/cairo/WaylandCairoShmSurface.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ struct pool_buffer
void *data;
size_t size;
bool busy;

/* Repaint-on-release: set when handleExposeRect skips attach because
* the compositor still holds the buffer. The release callback re-attaches
* and commits the buffer so the missed frame is not lost. */
bool needs_repaint;
struct wl_surface *owner_surface; /* the wl_surface this buffer is on */
struct wl_display *owner_display; /* for flushing after re-attach */
};

struct pool_buffer *
Expand All @@ -51,6 +58,9 @@ createShmBuffer(int width, int height, struct wl_shm *shm);
struct pool_buffer *pbuffer;
}
- (void) destroySurface;
/** Clear the wl_surface back-pointer so the release callback does not
* write to a destroyed Wayland proxy after destroySurfaceRole:. */
- (void) clearOwnerSurface;
@end

#endif
47 changes: 47 additions & 0 deletions Headers/wayland/WaylandDragView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/* WaylandDragView - Drag and Drop for Wayland backend

Copyright (C) 2024 Free Software Foundation, Inc.

This file is part of the GNUstep Backend.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/

#ifndef _WaylandDragView_h_INCLUDE
#define _WaylandDragView_h_INCLUDE

#include <AppKit/NSCell.h>
#include <AppKit/NSEvent.h>
#include <GNUstepGUI/GSDragView.h>
#include <Foundation/NSGeometry.h>

@interface WaylandDragView : GSDragView

+ (id) sharedDragView;

- (void) updateDragInfoFromEvent: (NSEvent *)event;
- (void) resetDragInfo;

/** Set up NSDraggingInfo state for an inbound drag from an external app.
* Called from the wl_data_device.enter C callback before posting
* GSAppKitDraggingEnter to the target window. */
- (void) setupInboundDragWithPasteboard: (NSPasteboard *)pb
operation: (NSDragOperation)op;

@end

#endif /* _WaylandDragView_h_INCLUDE */
57 changes: 57 additions & 0 deletions Headers/wayland/WaylandInputServer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/* WaylandInputServer - Keyboard input handling for Wayland backend

Copyright (C) 2024 Free Software Foundation, Inc.

This file is part of the GNUstep Backend.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/

#ifndef _WaylandInputServer_h_INCLUDE
#define _WaylandInputServer_h_INCLUDE

#include <AppKit/NSInputServer.h>
#include "wayland/WaylandServer.h"

@interface WaylandInputServer : NSInputServer
{
id delegate;
NSString *server_name;
int focused_window_id;
WaylandConfig *wlconfig; /* back-pointer for IME geometry calls */
}

- (id) initWithDelegate: (id)aDelegate name: (NSString *)name;
- (void) setFocusedWindowId: (int)windowId;
- (int) focusedWindowId;
- (void) setWlconfig: (WaylandConfig *)config;

@end

@interface WaylandInputServer (InputMethod)
- (NSString *) inputMethodStyle;
- (NSString *) fontSize: (int *)size;
- (BOOL) clientWindowRect: (NSRect *)rect;
- (BOOL) statusArea: (NSRect *)rect;
- (BOOL) preeditArea: (NSRect *)rect;
- (BOOL) preeditSpot: (NSPoint *)p;
- (BOOL) setStatusArea: (NSRect *)rect;
- (BOOL) setPreeditArea: (NSRect *)rect;
- (BOOL) setPreeditSpot: (NSPoint *)p;
@end

#endif /* _WaylandInputServer_h_INCLUDE */
Loading
Loading