Commit Graph

484 Commits

Author SHA1 Message Date
Window Maker 861ae10c8f decompose wl_backend.c: extract wl_icccm.c 2026-06-02 10:36:07 +02:00
Window Maker cbc9fa5a84 decompose wl_backend.c: extract wl_client.c 2026-06-02 10:28:48 +02:00
Window Maker 36cdc48f23 decompose wl_backend.c: extract wl_props.c 2026-06-02 10:25:02 +02:00
Window Maker 273589092d decompose wl_backend.c: extract wl_window.c (window map/unmap/move/resize/border/clear) 2026-06-02 10:18:57 +02:00
Window Maker b9450d16ad remove corrupted extraction files not yet building 2026-06-02 10:07:29 +02:00
Window Maker 5175cf880c decompose wl_backend.c: extract event, stacking, overlay modules 2026-06-02 10:07:10 +02:00
Window Maker 758623269b extract context from wl_backend 2026-05-31 12:34:04 +02:00
Window Maker 5173cbbdd5 fix: skip view-absolute position sync for reparented frame_bufs 2026-05-31 10:04:21 +02:00
Window Maker 654f24d8f8 fix: remove duplicate fake_leader check that short-circuited WINGs view reparent 2026-05-31 10:00:19 +02:00
Window Maker 59088e2f86 fix: realize dialog panel before client_reparent so WMWidgetXID returns a valid view ID 2026-05-30 15:45:09 +02:00
Window Maker c968c0b6f9 fix: offset dialog content below titlebar (frame top_width) 2026-05-30 15:40:48 +02:00
Window Maker dcfc4f44f4 fix: exit dialog content not visible at correct position — reparent fake_leader tree into frame tree 2026-05-30 15:39:07 +02:00
Window Maker d95d2c007c fix: exit dialog not visible on Wayland — preserve frame_buf parent on backing resize 2026-05-30 15:33:10 +02:00
Window Maker 86f7510a13 fix: non-responsive WINGs widgets on Wayland (overlapping sibling views + cascade compositing) 2026-05-30 15:29:04 +02:00
Ollie 6e902db869 fix: refresh pointer focus before delivering button event on Wayland
wlr_seat_pointer_notify_button delivers to the surface that currently has pointer focus. If the last wl_update_pointer_focus call was during a motion event that targeted a different area (e.g., titlebar), the XWayland client surface might not have focus when the user clicks on its content area. Added wl_update_pointer_focus call before wlr_seat_pointer_notify_button in handle_pointer_button to ensure pointer focus is always current.
2026-05-30 13:37:15 +02:00
Ollie 2eef17de24 fix: slider page-click uses event->u.motion.x/y instead of button.x/y on Wayland
WMEButton and WMEMotion are separate structs in the WMEvent union with different field layouts — u.motion.x is at a different memory offset than u.button.x. The WME_BUTTON_PRESS handler in wslider.c was calling valueForMousePoint(sPtr, event->u.motion.x, event->u.motion.y) which reads uninitialized memory on Wayland (memset zero = 0). On X11 this happened to work because the X11 event translator writes to both union members. Fix: changed all event->u.motion.x/y references to event->u.button.x/y in the WME_BUTTON_PRESS case.
2026-05-30 13:31:50 +02:00
Ollie e417682ed4 fix: event coordinates must be relative to WINGs target view, not toplevel
W_FindViewAtPoint finds the correct child view (slider, checkbox, etc.) but does not adjust event coordinates. The WMEvent x/y were set relative to the top-level WINGs view (fb->x, fb->y origin), while widget event handlers (getSliderPart, valueForMousePoint, etc.) expect coordinates relative to the widget view itself. Fixed by computing the accumulated offset from the target view up to the toplevel and subtracting it from the event coordinates. Applied to both handle_pointer_button and handle_pointer_motion.
2026-05-30 13:28:35 +02:00
Ollie 0342794845 fix: slider drag not working — motion events missing WINGs view target on Wayland
handle_pointer_motion enqueued WME_MOTION events with target=NULL. On button press, handle_pointer_button correctly resolves the WINGs child view (slider) via W_FindViewAtPoint and sets _view_target, so the slider receives the press and sets dragging=1. But subsequent motion events had NULL target, so WMHandleEvent routed them to the top-level view instead of the slider view — the slider never received WME_MOTION during drag. Fix: add W_FindViewAtPoint resolution in handle_pointer_motion, matching the button press logic.
2026-05-30 12:49:59 +02:00
Ollie d615077df8 fix: sliders not responding on Wayland — add W_RedisplayView after paintSlider
Slider value changes (from click, drag, or programmatic set) call paintSlider to draw the new knob position into the pixman backing buffer, but the backing was never committed to the scene graph on Wayland. Added W_RedisplayView(slider->view) after each paintSlider call in: WMSetSliderValue, WMSetSliderMinValue, WMSetSliderMaxValue, and handleActionEvents (WME_MOTION/WME_BUTTON_RELEASE). The expose handler path does NOT get W_RedisplayView to avoid recursion.
2026-05-30 11:57:24 +02:00
Ollie 97d5f51e58 fix: resizebar texture relief and indicator brightness on Wayland
Two issues: (1) Texture was rendered with WREL_RAISED which added a thick bevel border, making the 8px-tall resizebar appear too small. Changed to WREL_FLAT to match X11 behavior. (2) Corner indicator light color used +40 per channel but X11 uses +80 (ROperateLine RAddOperation with cdelta=80). Changed light delta from +40 to +80 so indicators are as visible as X11.
2026-05-30 11:52:32 +02:00
Ollie ae080d948c fix: resizebar missing corner grab indicators and bevel on Wayland
The Wayland backend wl_frame_paint rendered the resizebar texture but never drew the corner grab handles or top bevel lines that X11 includes. Added pixman-based rendering of: (1) top bevel lines (dim at y=0, light at y=1), (2) left corner grab handle (two vertical lines from y=2 to bottom), (3) right corner grab handle (two vertical lines from y=2 to bottom). Light/dim colors are derived from the rendered texture pixel at the resizebar center (+/- 40 per channel).
2026-05-30 11:50:38 +02:00
Ollie ae980e66e9 fix: resize wireframe animation on Wayland (overlay flush per draw)
The overlay drawing functions (wl_overlay_draw_rect, wl_overlay_draw_line) write XOR pixels to a client-side pixman buffer but never flushed it to the scene graph. On X11, each XDrawRectangle is immediately processed server-side, so the wireframe appears in real-time. On Wayland, the overlay buffer was only flushed in wl_server_ungrab() at the END of the resize operation. Added overlay_flush() after each draw call so each XOR batch is pushed to wlr_scene_buf and rendered immediately.
2026-05-30 11:41:48 +02:00
Ollie 1bf64c26c9 fix: resize/move indicator (gview) not updating on Wayland
Two bugs in geomview.c: (1) Missing backing commit on Wayland - paint() wrote to pixman backing but never pushed to scene graph. Added W_RedisplayView() after paint() in both WSetGeometryViewShownPosition and WSetGeometryViewShownSize. (2) Expose event handler used case Expose: (X11 constant value 12) instead of case WME_EXPOSE: (WINGs enum value 8) - harmless on X11 where Pixmap content is server-persistent, but broke Wayland where the expose handler is the re-draw mechanism after wl_redisplay fills the backing with bg color.
2026-05-30 11:37:51 +02:00
Window Maker fd6e972bbf wl_backend: fix W_ViewSceneNodeSetEnabledFn never wired — gview scene buffer stayed on after unmap
The blue position indicator (gview — geometry view with blue-gray background,
white coordinate text) was visible during window move, but never disappeared
when the move ended.

Root cause: W_ViewSceneNodeSetEnabledFn was declared in wview_wl.c and
called by wl_unmap() to disable the view's scene buffer node, but
wl_backend.c never wired it up — the pointer was NULL.

Also: add auto-create of frame_buf for WINGs toplevel views not explicitly
reparented (switch panel, menus, gview), sync position from WINGs view on
commit, auto-realize children in wl_map/wl_map_subviews, and guard scene
node enablement against unmapped views.
2026-05-30 11:17:10 +02:00
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