windowmaker-wl/src
Window Maker ef06f5ad8e wings: phases δ + ε — drop X11/Xlib.h from public WINGs headers
Major architectural milestone: WINGs Wayland-only files now have ZERO
transitive X11 header dependency at the preprocessor level (verified by
gcc -E grep: 0 mentions of X11/Xlib.h after preprocessing).

Changes:

  1. WUtil.h, WINGs.h: stop including <X11/Xlib.h>.  wnative.h provides
     forward declarations for Display, GC, XftDraw, XftFont; opaque
     pointer-only typedefs that don't conflict with Xlib.h's actual
     definitions when the X11 backend later includes it.

  2. WINGsP.h.in: stop including <X11/Xlib.h>, <X11/Xutil.h>.  Drop or
     re-route every X11-typed prototype:
       - W_HandleDNDClientMessage / W_DragSourceStateHandler /
         W_DragDestinationStoreEnterMsgInfo / etc.
         → moved to new private header WINGs/WINGsX11.h
       - W_HandleSelectionEvent → moved
       - W_LookupString / W_KeycodeToKeysym → moved
       - W_DndState typedef → moved (renamed to W_X11DndState)
       - XClientMessageEvent / XEvent / XKeyPressedEvent in prototypes
         → use void * in shared protos, cast in WINGsX11.h

  3. W_View struct: replaces XSetWindowAttributes by-value field with a
     small backend-neutral 'attribs' struct holding only the fields
     wmaker/WPrefs actually use (background_pixmap, background_pixel,
     border_pixel, colormap, cursor, override_redirect, save_under,
     event_mask, do_not_propagate_mask).  The X11 view backend
     translates to XSetWindowAttributes when calling XCreateWindow.
     XIC xic field replaced with void *xic.

  4. W_Color struct: replaces XColor by-value with a same-layout
     anonymous struct (pixel/red/green/blue/flags/pad).  X11 backend
     uses memcpy to populate from XColor.

  5. WINGs/WINGsX11.h (new): private header for X11 backend.  Includes
     <X11/Xlib.h>, declares X11-typed internal prototypes used by drag*,
     selection, IME, x11_backend, KeyboardShortcuts.  Required by every
     *_x11.c file plus a handful of cross-component callers
     (KeyboardShortcuts.c, MouseSettings.c, xmodifier.c, wmiv.c,
     x11_backend.c).

  6. wraster.h.in: gain a WRASTER_NO_XLIB compile-time switch.  When
     defined the header skips <X11/Xlib.h> and provides forward decls
     for Display/Visual/XImage/GC/XftFont/etc.  All Wayland-only WINGs
     files (wclient_wl.c, w*_wl.c) define WRASTER_NO_XLIB on line 1.

  7. wfont.c: adds W_ParseXLFDToFcPattern (a hand-written XLFD parser)
     replacing XftXlfdParse.  Removes <X11/Xft/Xft.h> include from the
     shared font dispatcher (and from wfontpanel.c too).

Verification:

  $ for f in WINGs/.libs/{*_wl.o,wclient_wl.o}; do
        nm $f | awk '$1=="U"{print $2}' | grep -cE '^X[A-Z][a-z]'
    done
  0 for every Wayland file

  $ for f in WINGs/.libs/*.o; do
        case $f in *_x11.o|*_wl.o|wclient_wl.o) continue;; esac
        c=$(nm $f | awk '$1=="U"{print $2}' | grep -cE '^X[A-Z][a-z]')
        [ $c -gt 0 ] && echo "$c $f"
    done
  (empty — no shared file leaks an X11 symbol either)

  $ gcc -E ... wclient_wl.c | grep -c X11/Xlib.h
  0 (no transitive Xlib include)

The library still pulls libX11 through the *_x11.c files when those are
linked in.  A future configure flag --disable-x11-backend will exclude
*_x11.c entirely; at that point libWINGs will be a pure-Wayland library
with zero libX11 dependency.
2026-05-24 11:37:18 +02:00
..
backend wings: phases δ + ε — drop X11/Xlib.h from public WINGs headers 2026-05-24 11:37:18 +02:00
GNUstep.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
Makefile.am arch: move wmspec.c (EWMH) and xdnd.c (XDND) into src/backend/x11/ 2026-05-24 09:16:39 +02:00
WindowMaker.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
actions.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
actions.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
appicon.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
appicon.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
application.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
application.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
appmenu.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
appmenu.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
balloon.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
balloon.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
client.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
client.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
colormap.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
colormap.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
cycling.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
cycling.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
def_pixmaps.h WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
defaults.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
defaults.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
dialog.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
dialog.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
dock.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
dock.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
dockedapp.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
dockedapp.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
event.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
event.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
extend_pixmaps.h WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
framewin.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
framewin.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
geom.c Wayland backend abstraction: WMBackend vtable (Phases 0–30) 2026-03-27 19:20:00 +01:00
geom.h Wayland backend abstraction: WMBackend vtable (Phases 0–30) 2026-03-27 19:20:00 +01:00
geomview.c wings: phase α.2 — rename X11 event masks to WM_EVMASK_* 2026-05-24 10:43:23 +02:00
geomview.h WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
icon.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
icon.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
keybind.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
main.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
main.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
menu.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
menu.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
misc.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
misc.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
monitor.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
monitor.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
motif.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
motif.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
moveres.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
osdep.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
osdep_bsd.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
osdep_darwin.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
osdep_linux.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
osdep_stub.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
pixmap.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
pixmap.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
placement.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
placement.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
properties.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
properties.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
resources.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
resources.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
rootmenu.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
rootmenu.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
screen.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
screen.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
session.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
session.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
shutdown.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
shutdown.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
stacking.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
stacking.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
startup.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
startup.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
superfluous.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
superfluous.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
switchmenu.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
switchmenu.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
switchpanel.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
switchpanel.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
texture.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
texture.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
usermenu.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
usermenu.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
wconfig.h wings: phase γ (widgets.c) — split Xlib calls into widgets_x11.c 2026-05-24 10:55:30 +02:00
wconfig.h.in Wayland backend abstraction: WMBackend vtable (Phases 0–30) 2026-03-27 19:20:00 +01:00
wcore.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
wcore.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
wdefaults.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
wdefaults.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
window.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
window.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
winmenu.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
winmenu.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
winspector.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
winspector.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
workspace.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
workspace.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
wsmap.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
wsmap.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
xdg-shell-protocol.h wayland: Phase 35 — advertise core Wayland protocol globals 2026-03-27 23:09:39 +01:00
xinerama.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
xinerama.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
xmodifier.c wings: introduce wnative.h; phase α.1 (modifier/button masks) 2026-05-24 10:42:04 +02:00
xmodifier.h arch: move X11 modifier-keymap discovery into X11 backend 2026-05-24 08:43:32 +02:00
xutil.c wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00
xutil.h wings: phase β — rename X11 typedefs in shared/Wayland code 2026-05-24 10:49:47 +02:00