Commit Graph

156 Commits

Author SHA1 Message Date
Levi Neely 6cda661609 Fix dialog content rendering: re-trigger child paint when top-level maps
Children were painted during panel creation (before frame_buf backing
was connected). Now wl_map triggers wl_map_subviews when a top-level
view is mapped, re-painting all children into the correct backing image.
2026-05-13 21:27:22 +02:00
Levi Neely 305b8096da Fix regression: only trigger redisplay on map for top-level views
wl_map was calling wl_redisplay on every view map, including internal
widgets during startup. This caused crashes when non-dialog views
received expose events before being fully set up.
2026-05-13 21:24:07 +02:00
Levi Neely 3a0ca5444e Fix NULL gview crash: create geometry view in Wayland screen path
The Wayland screen init path had 'goto screen_done' which skipped
gview creation. Now creates it before the goto. Also added safety
guard in moveGeometryDisplayCentered.
2026-05-13 20:05:17 +02:00
Levi Neely f348b3a04b Guard moveGeometryDisplayCentered against NULL gview 2026-05-13 20:01:13 +02:00
Levi Neely 72377068fd Dialog rendering: child view compositing and text field fixes
- wl_realize: allocate pixman backing image for every view
- wl_map_subviews: recursively trigger redisplay on child views
- wl_redisplay: composite child backing into parent, commit top-level
- wtextfield.c: replace XDefineCursor with W_SetViewCursor
- wtextfield.c: guard W_LookupString against NULL _x11_raw
2026-05-13 19:58:55 +02:00
Levi Neely b53cc4f0da Dialog rendering: composite child views into parent backing
- wl_realize: allocate pixman backing image for every view
- wl_map_subviews: recursively trigger redisplay on child views
- wl_redisplay: composite child's backing into parent's backing,
  then commit the top-level view's frame_buf
- wtextfield.c: guard W_LookupString against NULL _x11_raw
2026-05-13 19:57:12 +02:00
Levi Neely 4870c72c78 Fix dialog visibility: trigger paint on map, enable scene node on commit
- wl_map: set mapped=1 before calling wl_redisplay (was bailing because
  mapped flag wasn't set yet)
- wl_view_commit_backing_impl: enable scene node when content is committed
  (frame_buf was created disabled, never enabled before frame was mapped)
2026-05-13 19:51:22 +02:00
Levi Neely 6d9450ea8b Make dialogs visible: fake_leader, recursive reparent/map/move
- fake_leader_create: return a real frame_buf ID (was returning 0)
- client_reparent: handle frame_buf-to-frame_buf reparenting
- client_reparent: get WINGs view size from view table
- window_map: enable grandchildren (dialog content is grandchild of frame)
- window_move: move grandchildren when parent moves
- dialog.c: guard scr->w_visual for Wayland mode in Info panel
2026-05-13 19:45:41 +02:00
Levi Neely 9191f12913 Fix render backend crashes: resolve view IDs in all drawing functions
All WINGs render backend functions (draw_line, draw_rect, fill_rect,
pixmap_copy, composite_pixmap) now use resolve_drawable() to handle
WINGs view IDs (0x20000000+) by looking up the backing pixman image.

Also fixes:
- wfont_wl.c: resolve view IDs in draw_string/draw_image_string
- wtextfield.c paintCursor: use render backend draw_line (not XDrawLine)
- dialog.c wShowInfoPanel: guard scr->w_visual for Wayland mode
2026-05-13 19:40:31 +02:00
Levi Neely 1d0b82eed5 Implement WINGs dialog rendering infrastructure
- wl_client_reparent: create child frame_buf for WINGs views, connect
  backing pixman image so widgets paint into the scene graph
- View lookup table: map synthetic IDs to W_View* for event dispatch
- render_wl_pixmap_copy: detect view IDs and copy into backing image
- W_ViewCommitBacking callback: commit frame_buf after WINGs paint
- WMHandleEvent: use view table in Wayland mode (was always NULL)
- wtextfield.c paintCursor: use render backend draw_line instead of
  XDrawLine (crash fix for Run dialog)
2026-05-13 19:33:26 +02:00
Levi Neely 531dcf8235 Fix text rendering and titlebar positioning
- wl_draw_string: remove ascent subtraction, y is TOP position (matches
  X11 Pango behavior where pango_xft_render_layout takes top-left)
- Menu entry text: pass top position (y+3) not baseline (y+3+fh-1)
- Icon title: pass y=0 (top) not y=fh (baseline)
- frame_paint_titlebar: pass centered top not baseline
- frame_configure: compute absolute position from parent for children
  (was setting absolute pos to relative coords, warping to 0,0)
- Titlebar buffer: always render full frame width, resize if needed
- Frame scene node: disable when no resizebar (transparent, not needed)
- Always call frame_paint after show/hide button (TS_NEW was skipping it)
2026-05-13 19:03:49 +02:00
Levi Neely 3a48a0eb30 Fix close button: always call frame_paint after show/hide button
wFrameWindowShowButton was only calling updateTitlebar (not frame_paint)
when new_style==TS_NEW. Now always calls frame_paint so the close button
icon is rendered into the frame buffer after pinning a menu.
2026-05-13 18:28:45 +02:00
Levi Neely 147b9d0694 Fix hit-testing: prefer child frame_bufs over parents
frame_buf_at was returning the parent frame instead of child windows
(titlebar, content area) because the parent was later in the list.
Now prefers children (frame_bufs with parent_id set) over parents.

This fixes menu titlebar click detection — clicking the titlebar now
dispatches to titlebarMouseDown/menuTitleMouseDown instead of
menuMouseDown, enabling menu pinning and drag-to-move.
2026-05-13 18:21:07 +02:00
Levi Neely 08c0e07f6c Fix clean shutdown: remove pointer listeners, reset signal handlers
On SIGINT/SIGTERM:
- signalfd handler sets terminate flag and exits the event loop
- After loop exit, remove wlroots pointer listeners to prevent
  assertion failure in wlr_pointer_finish
- Reset SIGTERM/SIGINT/SIGHUP to SIG_DFL after signalfd takes over
  to prevent the old handleExitSig from competing
2026-05-13 18:06:01 +02:00
Levi Neely 8922525d3c Fix crash: guard wRootMenuPerformShortcut against NULL _x11_raw
handleKeyPress passed event->_x11_raw (NULL in Wayland mode) to
wRootMenuPerformShortcut which dereferences it immediately. Skip
the call when _x11_raw is NULL.
2026-05-13 18:01:07 +02:00
Levi Neely a517c16f5e Guard WINGs realizeWindow against NULL display in Wayland mode
When a menu entry triggers a WINGs dialog (e.g. 'Run...'), the
realizeObserver notification calls realizeWindow which does X11 calls
(XSetClassHint, XAllocWMHints). In Wayland mode scr->display is NULL,
causing a segfault. Skip the entire function when display is NULL.
2026-05-13 17:56:46 +02:00
Levi Neely fb2d0ab2ef Implement pointer_get_position: return tracked cursor coordinates
pointer_get_position was a noop returning (0,0), causing findMenu to
always return NULL. This made the menu close on every button release
regardless of pointer position. Now returns wl_state.pointer_x/y which
are updated on every pointer motion event.

With this fix, the root menu stays open when the pointer is over it on
release (matching X11 behavior), allowing entry selection or titlebar
pinning.
2026-05-13 17:52:17 +02:00
Levi Neely bfa248ae29 Fix findMenu y_ret: subtract top_width for content-relative coords
findMenu was returning y relative to the frame top (including titlebar).
getEntryAt expects y relative to the content area. Subtracting top_width
means pointer in titlebar gives y<0 → entry_no=-1 (no selection), which
is correct behavior matching the X11 path.
2026-05-13 17:48:08 +02:00
Levi Neely 784fcfbfb2 Implement frame button rendering (close/iconify icons)
Add wl_frame_paint_button which renders button icons from XPM data
into the parent frame buffer. Called both from the vtable slot and
from wl_frame_paint during titlebar rendering. Uses PRED_CLOSE_XPM
and PRED_ICONIFY_XPM parsed lazily via RGetImageFromXPMData.

Also removes XEvent from all WFrameWindow callbacks (on_click_left,
on_click_right, on_dblclick_right, on_mousedown_resizebar) — they
now take WMEvent*.
2026-05-13 17:46:21 +02:00
Levi Neely 1af95d539f Fix menu unmap: hide children when parent is unmapped
wl_window_unmap now disables child scene nodes when the parent is
hidden. This fixes the menu entries staying visible after the menu
frame (titlebar) was unmapped. The entire menu now disappears
together, matching X11 behavior where the brother menu closes on
button release.
2026-05-13 17:32:49 +02:00
Levi Neely 0dc38e4d79 Fix findMenu: check brother menus and dock menus
The root menu uses a 'brother' copy for the live instance. findMenu
was only checking the original, not the brother, so it returned NULL
when the pointer was over the active menu copy. This caused the menu
to close immediately on button release (closeCascade triggered by
!smenu condition).
2026-05-13 17:29:40 +02:00
Levi Neely f2dfe4a4d0 Remove XEvent from frame callbacks (titlebar, resizebar, buttons)
All WFrameWindow callbacks (on_mousedown_titlebar, on_dblclick_titlebar,
on_mousedown_resizebar, on_click_left, on_click_right, on_dblclick_right)
now take WMEvent* instead of XEvent*. This fixes the crash when clicking
the menu titlebar in Wayland mode (_x11_raw was NULL).

Affected files: framewin.h, framewin.c, menu.c, window.c, dialog.c,
winspector.c. All verified X11-free with nm.
2026-05-13 17:27:02 +02:00
Levi Neely b248dd04a7 Fix findMenu: use bounds checking instead of broken X11 window query
findMenu always returned NULL because the refactored code set win=0
then checked 'if (win == None) return NULL'. Replace with geometric
bounds checking against mapped menus. This fixes the menu disappearing
on button release (closeCascade was called because smenu was NULL).
2026-05-13 17:02:05 +02:00
Levi Neely 1905fdf08a Fix frame buffer: clear to transparent so children show through
The frame buffer was cleared to opaque black, covering the menu
content child buffer. Now cleared to alpha=0 (transparent).
2026-05-13 16:59:47 +02:00
Levi Neely baca61df68 Fix menu title bar: implement frame_buf resize in window_resize
The menu frame was created at 1x1 and resized via wFrameWindowResize
which calls window_resize. But wl_window_resize didn't handle
frame_bufs — it only handled toplevel views. Now it reallocates the
pixman image when dimensions change, so the frame has the correct
size when wl_frame_paint renders the title bar.
2026-05-13 16:55:45 +02:00
Levi Neely 40a10a0785 Improve menu rendering: separators, bevel edges, cascade arrows, title
- Entry separators: light line on top, dark line on bottom between entries
- Left/right bevel edges on each entry
- Cascade arrow (triangle) for submenu entries
- Paint menu frame title bar (wl_frame_paint) when menu is shown
- Matches X11 menu_draw_frame behavior
2026-05-13 16:52:06 +02:00
Levi Neely b9dbd23dfc Remove XEvent from dock.c and appicon.c click handlers
All dock/clip/appicon mouse handlers now use WMEvent directly:
- openDockMenu, iconDblClick, handleDockMove, handleClipChangeWorkspace
- wHandleAppIconMove (appicon.c)
- Removed x11_translate_event hack in dock menu forwarding
- dock.o and appicon.o verified X11-free with nm
2026-05-13 16:45:01 +02:00
Levi Neely 110a555cfa Fix spurious menu visibility: don't map child if parent is hidden
In X11, child windows are only visible when the parent is mapped.
In Wayland, all frame_bufs are independent scene nodes. The menu
content window was being mapped at creation time (wMenuCreate),
making it visible even though the parent frame was offscreen/hidden.

Fix: wl_window_map skips enabling a child node if its parent's
scene node is not yet enabled.
2026-05-13 16:31:34 +02:00
Levi Neely 7921d2def8 Fix menu rendering: create real frame_bufs for child windows
Child windows (menu content area, titlebar, resizebar) need their own
pixman buffers for painting. Previously frame_create_child returned a
bare synthetic ID with no buffer, so menu_paint_entry found nothing.

Also add parent-child tracking: when a parent frame moves or maps,
all children are repositioned/enabled automatically. Children store
their relative offset and parent ID.
2026-05-13 16:29:06 +02:00
Levi Neely 01bed8bdd3 Paint menu after mapping (no Expose events in Wayland)
In X11, mapping a window triggers Expose which causes repainting.
In Wayland there are no Expose events, so wMenuPaint must be called
explicitly after the menu is mapped in wMenuMapAt.
2026-05-13 16:24:32 +02:00
Levi Neely d93f4935ca Fix input dispatch: custom event loop + modal menu support
The deadlock: frame_timer_cb called WMHandleEvent which entered
menuMouseDown's modal WMMaskEvent loop. That blocked inside
wl_event_loop_dispatch (reentrant), preventing new events.

Fix:
1. Replace wl_display_run() with custom loop that drains WINGs
   events BETWEEN wl_event_loop_dispatch calls (not inside timer)
2. Make WINGs wl_flush() pump wlroots (call dispatch_fn) so
   WMMaskEvent modal loops get new events without reentrancy
3. Fix wBalloonHide NULL dereference (scr->balloon not allocated)
4. Remove XEvent dependency from wSelectWindows (takes x,y now)
5. Remove debug traces

Right-click on background now opens the root menu.
2026-05-13 16:22:13 +02:00
Levi Neely ac739a1a5c Implement input dispatch: hit-test pointer events to WM windows
- frame_buf_at(): hit-test finds which WM frame_buf is under pointer
- Button/motion events set window field to frame_buf ID or root_win
- Root window gets synthetic ID (0x0FFFFFFF) in Wayland mode
- Right-click on background → handleButtonPress → OpenRootMenu path
- wSelectWindows: remove XEvent dependency, take (x, y) coordinates
- Zero X11 symbols in event.o and moveres.o (verified with nm)
2026-05-13 15:57:40 +02:00
Levi Neely fe8f7a923f Use default WindowMaker background color (rgb:50/50/75)
The dark blue-grey matches the classic WindowMaker desktop appearance.
2026-05-13 14:28:15 +02:00
Levi Neely b663ab8360 Implement Wayland text rendering + frame titlebar/resizebar
Text rendering uses the existing WINGs PangoFT2 backend — WMDrawString
renders directly into the frame buffer's pixman_image_t.

- Menu entries: real text via PangoFT2 (entry text + shortcut labels)
- Dock/clip icon titles: rendered with icon_title_font
- Frame titlebar: solid background + centered title text
- Frame resizebar: beveled grey bar

All text is anti-aliased (PangoFT2 alpha compositing onto pixman).
2026-05-13 14:27:11 +02:00
Levi Neely 582e527aea Implement Wayland clip icon + menu rendering
- Clip/drawer icons: reuse wl_appicon_paint (tile rendering)
- Menu entries: solid background fill (grey normal, blue selected)
  with placeholder text line. Full text rendering TODO.
- Menu frame: beveled border (light top/left, dark bottom/right)
- All rendering commits to scene graph via wlr_scene_buffer_set_buffer
2026-05-13 14:20:24 +02:00
Levi Neely 7e1da342be Fix XWayland crash: switch to lazy mode
XWayland was started eagerly (at compositor init) which caused a
segfault when XWayland couldn't connect back to the Wayland socket
(race condition in nested mode). Since the WM UI is now pure Wayland
(no X11 rendering), XWayland is only needed for X11 client apps.

Switch to lazy mode: XWayland starts only when the first X11 client
connects. This eliminates the startup wait loop and the associated
crash. Also set xwayland_ready=true in the server destroy handler
as a safety net.
2026-05-13 14:16:47 +02:00
Levi Neely faf4c76085 Fix clean build: add RCreateContextWayland to wraster.h.in
wraster.h is generated from wraster.h.in — the declaration was only
in the generated file, not the template. Also includes the Wayland
no-op for RConvertImage/RConvertImageMask (context->dpy == NULL).
2026-05-13 14:12:33 +02:00
Levi Neely bca128d593 Implement Wayland dock icon rendering
- wl_appicon_paint: renders dock icons by compositing the icon tile
  (RImage) with the app image, then blitting RGBA→ARGB32 into the
  frame buffer's pixman image and committing to the scene graph.

- Color parser: add grayNN/greyNN pattern support (gray0-gray100)
  and rgb:RR/GG/BB X11 color format. All default textures now parse.

- Dock paint trigger: add explicit dockIconPaint calls at end of
  wDockCreate and wDockRestoreState since Wayland has no Expose
  events on window map.

The dock icon tile is now visible in the compositor window.
2026-05-13 14:03:35 +02:00
Levi Neely b4484e05bc Fix Wayland startup: compositor window appears and event loop runs
Three root causes fixed:

1. RCreateContext crash: wScreenInit called RCreateContext(dpy=NULL).
   Fix: add RCreateContextWayland() to wrlib — creates a minimal 32-bit
   ARGB context without X11. Wayland path in screen.c now always taken
   when is_wayland (removed incorrect XWayland fallthrough).

2. Color parsing: parse_color and get_color_for_colormap were no-ops.
   Fix: implement real color parser in wl_backend supporting #RGB,
   #RRGGBB, #RRRRGGGGBBBB, rgb:RR/GG/BB, and common named colors.
   Texture creation (solid, gradient) now works in Wayland mode.

3. RConvertImage crash: wrlib tried XCreateImage with NULL display.
   Fix: RConvertImage/RConvertImageMask return success with pixmap=0
   when context->dpy is NULL. Callers don't use pixmaps in Wayland
   mode (rendering goes through vtable slots to pixman buffers).

4. Workspace crash: Wayland path skipped wWorkspaceNew(), so
   workspace_count=0 when menu tried to access workspace entries.
   Fix: add wWorkspaceNew + netwm_init to Wayland screen init path.

Result: compositor starts, event loop runs, window is visible.
WMAKER_USE_WAYLAND=1 wmaker now shows a compositor window.
2026-05-13 13:51:27 +02:00
Levi Neely 9c48a0c841 Phase 80t: ZERO X11 symbols in policy files — architecture complete
- wmspec.c, xdnd.c, xmodifier.c: pure X11 mechanism code now compiled
  as part of x11_backend.o (included via #include in x11_backend.c).
  Removed from main link (Makefile modified).
- Policy file calls to NETWM/XDND functions replaced with vtable dispatch:
  netwm_process_client_message, xdnd_process_client_message,
  xdnd_process_selection, xdnd_make_awareness,
  netwm_check_client_hint_change, netwm_position_splash,
  netwm_check_initial_frame_state
- x11_prop_get_check_property now returns wfree-able memory (callers
  use wfree instead of XFree)

RESULT: nm -u *.o | grep ' U X' returns ZERO for all non-backend .o files.
The backend abstraction is architecturally complete.
2026-05-13 13:03:14 +02:00
Levi Neely ae499aae87 Phase 80s: clean X11 from menu.c, misc.c
- menu.c: wMenuPaintEntry (172 lines of X11 rendering) replaced with
  vtable dispatch; wMenuDrawFrame inlined into x11_backend;
  XGrabPointer/XGrabKeyboard -> pointer_grab/keyboard_grab;
  XQueryPointer -> pointer_get_position; XLookupKeysym -> keysym_from_keycode
- misc.c: slide_window/slide_windows XMoveWindow -> window_move;
  wGetTextSelection (X11 selection protocol) -> get_text_selection vtable;
  XKeysymToString -> keysym_to_string; XGetCommand -> window_get_command;
  XFree -> wfree (x11_prop_get_check_property now copies to wfree-able mem)

New vtable slots: pointer_get_position, keysym_to_string, window_get_command.
x11_prop_get_check_property now returns wfree-able memory (copies from X11).
Both files verified X11-free with nm.
2026-05-13 12:55:58 +02:00
Levi Neely f1df339f10 Phase 80r: clean X11 from dialog.c
- XCreateSimpleWindow/XReparentWindow (7 pairs) -> fake_leader_create/client_reparent
- XLookupKeysym/XLookupString -> keysym_from_keycode
- XFillRectangle/XDrawLine/XCopyArea/XSetClipMask/XSetClipOrigin ->
  new dialog_paint_icon vtable slot
- XSetInputFocus -> focus_set (existing slot)

New vtable slot: dialog_paint_icon.
dialog.o verified X11-free with nm.
2026-05-13 12:42:18 +02:00
Levi Neely 937a0c2a3a Phase 80q: clean X11 from event.c
- XAllowEvents -> event_allow_async / event_replay_pointer
- XRefreshKeyboardMapping -> keyboard_mapping_refresh
- XCheckTypedWindowEvent -> event_check_window / event_flush_window
- XCheckTypedEvent -> event_check_type / event_flush_type
- XGetGeometry (existence check) -> window_exists
- XGetWindowAttributes (colormap) -> window_get_colormap
- XQueryPointer -> pointer_query_window
- XSendEvent -> client_send_event
- XWarpPointer -> pointer_warp_to (existing)
- XInstallColormap -> colormap_install (existing)

New vtable slots: event_allow_async, event_replay_pointer,
keyboard_mapping_refresh, event_flush_window, event_flush_type,
event_check_window, event_check_type, client_send_event,
window_exists, window_get_colormap, pointer_query_window.
event.o verified X11-free with nm.
2026-05-13 12:39:24 +02:00
Levi Neely 69799ccdab Phase 80p: clean X11 from balloon.c, dock.c
- balloon.c: wBalloonInitialize inlined into x11_balloon_init;
  all rendering functions (drawBalloon, makePixmap, showText,
  show_minipreview) removed — balloon_show vtable dispatches rendering.
  WBalloon struct moved to balloon.h for backend access.
- dock.c: wClipIconPaint/wDrawerIconPaint replaced with vtable dispatch;
  paintClipButtons removed; XGrabPointer -> pointer_grab;
  XChangeActivePointerGrab -> pointer_change_cursor;
  XCheckTypedEvent/XPutBackEvent -> event_check_enter_leave;
  XMoveResizeWindow -> frame_configure; XFillRectangle -> window_fill_stipple

New vtable slots: balloon_show, window_fill_stipple, event_check_enter_leave.
Both files verified X11-free with nm.
2026-05-13 12:25:57 +02:00
Levi Neely 530e1a91f9 Phase 80o: clean X11 from superfluous.c
- DoKaboom: body replaced with vtable dispatch (do_kaboom slot);
  X11 animation temporarily disabled in backend (cosmetic only)
- doAppBounce: XRaiseWindow -> stacking_raise, XMoveWindow -> window_move
- MakeGhostIcon: kept in superfluous.c (uses wrlib, not direct X11)

superfluous.o verified X11-free with nm.
2026-05-13 11:46:40 +02:00
Levi Neely ea29b109f7 Phase 80n: clean X11 from icon.c
- drawIconTitleBackground (XFillRectangle/XDrawLine) -> icon_paint_title_bg
- cycleColor/wIconSelect (XChangeGC/XDrawRectangle) -> icon_select_paint
- getSize (XGetGeometry) -> pixmap_get_size
- XGetWindowAttributes -> window_get_event_mask
- XGrabPointer -> pointer_grab
- XChangeActivePointerGrab -> pointer_change_cursor
- XReparentWindow -> client_reparent
- XClearArea -> window_clear (existing)
- XFree -> wfree

New vtable slots: icon_paint_title_bg, icon_select_paint,
window_get_event_mask, pixmap_get_size.
icon.o verified X11-free with nm.
2026-05-13 11:42:49 +02:00
Levi Neely 2bb40cf9fa Phase 80m: clean X11 from appicon.c
- wAppIconPaint: X11 rendering (dock dots, corner triangle, stipple)
  moved to new appicon_paint_dock_dots vtable slot
- XGrabPointer -> pointer_grab vtable
- XChangeActivePointerGrab -> new pointer_change_cursor vtable slot
- drawCorner removed (inlined into x11 backend)

New vtable slots: pointer_change_cursor, appicon_paint_dock_dots.
appicon.o verified X11-free with nm.
2026-05-13 11:31:31 +02:00
Levi Neely 40ac4f252b Phase 80l: clean X11 from defaults.c
- XParseColor (9 calls) -> parse_color vtable slot
- XStringToKeysym -> keysym_from_name (existing slot)
- XReadBitmapFile/XQueryColor/XCreatePixmapCursor -> cursor_create_from_files
- XFreeCursor -> cursor_free
- XDefineCursor -> cursor_set
- XUngrabKey -> key_ungrab_all (existing slot)

New vtable slots: parse_color, cursor_create_from_files, cursor_free,
cursor_set.
defaults.o verified X11-free with nm.
2026-05-13 11:27:07 +02:00
Levi Neely 6f1c499b03 Phase 80k: clean X11 from startup.c
- getOffendingModifiers (XGetModifierMapping/XFreeModifiermap) ->
  setup_modifier_lock_masks vtable slot
- wHackedGrabKey (XGrabKey with NumLock/ScrollLock combos) ->
  key_grab_hacked vtable slot
- wHackedGrabButton (XGrabButton with lock combos) ->
  button_grab_hacked vtable slot
- XUniqueContext calls -> context_init vtable slot
- XQueryTree/XFree in wManageAllWindows -> query_tree vtable slot
  (returns wfree-able array)
- XGetWindowAttributes in wScreenForWindow -> screen_for_window vtable
- _NumLockMask/_ScrollLockMask made non-static (needed by x11_backend)

New vtable slots: setup_modifier_lock_masks, key_grab_hacked,
button_grab_hacked, context_init, query_tree, screen_for_window.
startup.o verified X11-free with nm.
2026-05-13 11:24:45 +02:00
Levi Neely 6d4fc32b28 Phase 80j: clean X11 from shutdown.c, framewin.c, properties.c
- shutdown.c: RestoreDesktop/wWipeDesktop/restoreWindows moved entirely
  to x11_backend.c; policy file contains only vtable dispatch stubs
- framewin.c: wFrameWindowPaint restructured — policy logic stays,
  X11 rendering (resizebar lines, titlebar pixmap ops) dispatched through
  new frame_paint_resizebar/frame_paint_titlebar vtable slots
- properties.c: all 6 functions (PropGetProtocols, PropGetCheckProperty,
  PropSetWMakerProtocols, PropSetIconTileHint, PropGetClientLeader,
  PropGetWindowState, PropCleanUp) replaced with vtable dispatch stubs;
  X11 implementations inlined into x11_backend.c

New vtable slots: frame_paint_resizebar, frame_paint_titlebar,
prop_get_client_leader, prop_get_window_state.
All three files verified X11-free with nm.
2026-05-13 11:18:19 +02:00