Commit Graph

460 Commits

Author SHA1 Message Date
Ollie 2797e1dcfc ROADMAP: update pointer_change_grab entry with cursor fix detail 2026-05-30 09:09:35 +02:00
Ollie 39ba8d6794 wl_backend: fix cursor reverting to arrow during opaque window drag 2026-05-30 09:07:57 +02:00
Ollie da9a62bf23 wl_backend: cursor reset only on pointer leave (no enter reset) — fixes move cursor, no I-beam leak 2026-05-29 17:19:14 +02:00
Ollie fd7a760ce3 wl_backend: restore cursor reset on enter/leave with grab guard — fixes stuck cursor 2026-05-29 17:12:39 +02:00
Ollie 1fed9a1a3e wl_backend: stop resetting cursor on pointer leave too — let cursor stay during appicon drags 2026-05-29 17:10:35 +02:00
Ollie 26ea32a28b wl_backend: reset cursor to left_ptr on ungrab — same logic as dock/clip drags 2026-05-29 17:09:11 +02:00
Ollie 9ec08d9b6a fix: make view_table_remove non-static so wview.c can call it 2026-05-29 17:07:52 +02:00
Ollie 071f8aba6e fix extern declaration placement for view_table_remove 2026-05-29 17:06:41 +02:00
Ollie 03fa233ff7 wview: remove view from lookup table in destroyView before freeing — fix use-after-free race 2026-05-29 17:06:19 +02:00
Ollie 7fcfb0870d wl_backend: stop resetting cursor to left_ptr on every surface enter — let clients set their own cursor 2026-05-29 08:39:36 +02:00
Ollie 9592cf295e wl_backend: guard cursor reset in wl_update_pointer_focus during grabs; add WCUR_WAIT 2026-05-29 08:38:07 +02:00
Ollie c5a90f4c9c debug: wl_set_cursor_image trace to find what resets cursor during grab 2026-05-29 08:35:38 +02:00
Ollie 87ed6976a5 wl_backend: use correct cursor in wl_pointer_grab (not always left_ptr) 2026-05-29 08:26:28 +02:00
Ollie 2577050f44 wl_backend: implement pointer_change_grab — update cursor during move/resize 2026-05-29 08:00:28 +02:00
Ollie 0f3ce45d38 docs: update ROADMAP + BACKEND_ABSTRACTION to reflect WINGs X11 isolation complete 2026-05-28 23:00:53 +02:00
Ollie 8a4e3954a0 wl_backend: implement client_snapshot via buffer read (XWayland: XGetImage, native: wlr_buffer) 2026-05-28 22:56:39 +02:00
Ollie d548b2a1b0 roadmap: mark clipboard + session persistence tested 2026-05-28 22:50:15 +02:00
Ollie 0642bcb92c xwayland: eager mode (start at init, not on first X11 client) — eliminates 3-5s lag 2026-05-28 22:43:39 +02:00
Ollie a721f1333a wl_backend: display_get_name returns XWayland display instead of wayland-0 (fixes X11 child DISPLAY) 2026-05-28 22:40:23 +02:00
Ollie 8a9e400fd5 session: remove debug prints from wl_prop_get_wm_class 2026-05-28 22:36:06 +02:00
Ollie a117a9e437 session: debug prints in wl_prop_get_wm_class to diagnose xterm save failure 2026-05-28 22:34:36 +02:00
Ollie 0a03ff03d7 wl_backend: fix prop_get_wm_class return value (0=fail, 1=success) — broke session save 2026-05-28 22:18:37 +02:00
Ollie 0abaf1fefa session: save/restore window state for Wayland native clients (match by app_id) 2026-05-28 22:14:32 +02:00
Ollie 05b66c2b5c textfield: fix stuck waitingSelection after sync paste on Wayland (blocked key events) 2026-05-28 21:47:23 +02:00
Ollie f054296eb1 textfield: always re-acquire selection on double-click (fix Wayland paste→stale ownsSelection) 2026-05-28 21:44:51 +02:00
Ollie f2b4d25b81 selection: fix use-after-free crash from duplicate handler delete 2026-05-28 21:42:02 +02:00
Ollie 2b692a34f1 selection: delete stale handler on Wayland so re-selection pushes fresh data 2026-05-28 21:36:26 +02:00
Ollie 1bcd815001 clipboard: make store idempotent to avoid re-init of in-use data source 2026-05-28 21:32:10 +02:00
Ollie 5d456d5b95 selection: fix crash on Wayland when W_NativeInternAtom called with NULL display 2026-05-28 21:18:18 +02:00
Ollie 367b488e47 selection: push data to compositor on acquire for Wayland (select→paste) 2026-05-28 21:04:24 +02:00
Ollie 784b4c89ce balloon: fix leave tracking + multi-line height in wl_balloon_draw 2026-05-28 20:37:51 +02:00
Ollie adf79141b2 dnd: cross-client motion/drop handler with MIME type routing 2026-05-28 20:29:26 +02:00
Ollie b278d6491d roadmap: mark wcolorpanel complete 2026-05-28 19:55:55 +02:00
Ollie 14b660ff50 colorpanel: split into wcolorpanel.c + _x11.c + _wl.c (412->0 X11 calls) 2026-05-28 19:55:41 +02:00
Ollie 39b63a8184 DND: compositor-internal drag icon overlay + cursor feedback + cross-client wiring 2026-05-28 19:35:41 +02:00
lkn e1eaf17925 docs: replace planning docs with forward-looking ROADMAP.md
Remove completed planning documents (WAYLAND_ROADMAP.md, ACTION_PLAN.md,
ACTION_PLAN_PROMPTS.md). Update ARCHITECTURE.md and BACKEND_ABSTRACTION.md
with current file sizes and completion status. Add ROADMAP.md covering
remaining work prioritized for daily-driver use.
2026-05-26 15:55:25 +02:00
Window Maker db8cd0ea34 WINGs: fix WPrefs not launching in X11 mode
Three issues prevented WPrefs from being managed by wmaker in X11:

1. W_X11OpenDisplay: XOpenDisplay("") fails; treat empty string as NULL
   so it falls back to DISPLAY env var.

2. wevent_x11.c/wevent.c: MapRequest and ConfigureRequest events must
   bypass WINGs view lookup (both _view_target in x11_fetch and
   W_GetViewForWindow in WMHandleEvent) to reach DispatchEvent via
   extraEventHandler.

3. wview_x11.c: x11_create_root must use RootWindow() not
   scr->rootWin (which may be an intermediate window created by
   RCreateContext for non-default visuals). Otherwise toplevel
   WINGs windows are created as children of the wrong parent and
   their MapRequest never reaches the WM.
2026-05-25 18:08:09 +02:00
Window Maker 8700f9a955 WINGs: fix XOpenDisplay with empty string failing for WPrefs
WPrefs.app/main.c defaults display_name to "" (empty string).
W_X11OpenDisplay passed this directly to XOpenDisplay, but
XOpenDisplay("") is not equivalent to XOpenDisplay(NULL) — the
former fails while the latter uses the DISPLAY environment variable.

Treat empty display string as NULL so XOpenDisplay falls back to
the environment variable.

Also remove debug traces from event.c and x11_backend.c.
2026-05-25 17:27:48 +02:00
Window Maker 03fe6771cc WINGs/wevent_x11: fix MapRequest/ConfigureRequest not reaching WM dispatch
SubstructureRedirect events (MapRequest, ConfigureRequest) are delivered
to the root window. Since the root window has a WINGs view registered
(the WMScreen root view), W_GetViewForXWindow resolves it and
WMHandleEvent dispatches to the view handlers instead of falling through
to extraEventHandler (DispatchEvent).

This caused WINGs-based apps like WPrefs to never have their windows
managed by the WM - the MapRequest was silently consumed.

Fix: skip the view lookup for MapRequest and ConfigureRequest events so
they always reach DispatchEvent via extraEventHandler.
2026-05-25 17:17:03 +02:00
Window Maker b714cb783d x11: fix menu rendering, balloon tooltips, clip arrows, and event handling
Menu entry painting:
- Add drawFrame() calls for 3D beveled entries (WTEX_SOLID)
- Add menu_text_clearance to text Y positioning
- Add left-side indicator drawing (radio/check/snap pixmaps)
- Add indicator X offset (MENU_INDICATOR_SPACE)
- Fix disabled+selected text color
- Fix texture-aware background clearing
- Add cascade arrow for submenu entries

Balloon tooltips:
- Implement x11_balloon_show() with text and mini-preview rendering
- Previously was a no-op stub

Clip arrows:
- Draw workspace-switching triangles on clip icon
- Previously stubbed out

Event handling:
- Add MapRequest, ConfigureRequest, ReparentNotify translation to
  xev_to_wme() in WINGs/wevent_x11.c
- These WM-critical events were silently dropped, preventing new X
  clients (e.g. xterm) from being managed
2026-05-25 17:04:30 +02:00
Window Maker f878117013 WINGs: deliver maskless events (selection, mapping) to all handlers
Selection and mapping events have mask 0 in the type table (matching
X11 semantics where they bypass event masks). Change the dispatch
check to deliver events with mask==0 to all registered handlers,
so these events are not silently dropped.
2026-05-25 13:39:18 +02:00
Window Maker 1954fa2a12 WINGs: fix WME_CLIENT_MESSAGE mask so close events reach handlers
The wmeMaskForType table had WME_CLIENT_MESSAGE mapped to 0, so
WMHandleEvent never dispatched client messages to registered handlers.
The window close handler (registered with ClientMessageMask) was never
called. Set the correct mask so the deleteWindow protocol works.
2026-05-25 13:37:32 +02:00
Window Maker d522fc87c5 wayland: use non-blocking read_events for client dispatch
The poll-based wlclient_dispatch with timeout 0 missed events that
were already buffered. Use prepare_read/read_events/dispatch_pending
which reads whatever is available on the socket without polling.
2026-05-25 13:33:30 +02:00
Window Maker fe2ec1fb9e wayland: pump client display in main loop for close button support
In-process WINGs clients have their own wl_display connection that
needs to be dispatched for xdg_toplevel.close to be received. Add
W_WLClientDispatchPending() and call it each main loop iteration
so protocol events reach the client-side handlers promptly.
2026-05-25 13:32:59 +02:00
Window Maker 94157394d7 wayland: fix close button for WINGs clients by flushing after send_close 2026-05-25 13:31:38 +02:00
Window Maker 36c2396130 WINGs/wayland: defer redisplay during W_RealizeView to prevent crash
During W_RealizeView, child views with mapWhenRealized triggered
wl_map which called wl_redisplay on the toplevel. This ran expose
handlers on a partially-realized widget tree, causing backing image
corruption from resizes during redisplay.

Fix: track realization depth with W_WL_Realizing counter. wl_map
skips redisplay when realization is in progress. After the outermost
W_RealizeView completes, trigger a single redisplay of the toplevel
to paint everything correctly.
2026-05-25 13:29:46 +02:00
Window Maker 6e18e1fe0d WINGs/wayland: use backing image dimensions for fill_rectangles
The fill_rectangles call used view->size which can exceed the backing
image dimensions when a view is resized during realization without its
backing being reallocated. This wrote past the allocated buffer,
corrupting the heap and causing later pixman_image_composite32 crashes.
Use pixman_image_get_width/height of the actual backing instead.
2026-05-25 13:22:41 +02:00
Window Maker 7a93b1d389 WINGs/wayland: remove diagnostic fprintf, keep bounds clipping
Remove the verbose COMPOSITE fprintf and BAD composite warning that
were used for debugging. Keep the source/destination bounds clipping
as it correctly handles the case where view->size diverges from the
backing image dimensions during realization.
2026-05-25 13:21:14 +02:00
Window Maker ef98cc3c64 WINGs/wayland: prevent infinite redisplay recursion during resize
The font prefs panel crashed because wl_resize called wl_redisplay
while already inside a redisplay. This caused expose handlers to
trigger more resizes, creating unbounded recursion and memory growth
(backing images growing to 1024+ pixels wide). Skip the redisplay
from wl_resize when wl_redisplay_depth > 0 — the ongoing parent
redisplay will composite the resized child at its new size.
2026-05-25 13:19:39 +02:00
Window Maker 4a6c5330a3 WINGs/wayland: also clip composite to destination bounds and check data
The previous source-only clamp was insufficient. Also check that both
src and dst have non-NULL pixel data, and clip the composite region to
the destination image dimensions to prevent out-of-bounds writes.
2026-05-25 13:12:58 +02:00