| Age | Commit message (Collapse) | Author |
|
Floating windows: move (titlebar), resize (two bottom corner grips), and a per-
window close button. Per-window geometry (x,y,w,h,z) is bound STATE applied via
data-style left/top/width/height + z-index; a pure, doctested geometry core
(move / resize_bl / resize_br with anchored-opposite-edge + min-size, field
clamp) computes drag results. Positioning uses left/top (NOT a transform: RmlUi's
data-style does not apply a transform here the way it does left/top/width/height,
and a transform would also offset the drag hit-test). z-order raise on focus;
cascade placement from the client's own size.
Resize-to-tile: a frame-pumped feedback loop configures each client to its on-
screen box (Toplevel::set_size) so the live texture maps 1:1. Policy is config-
driven -- [window-field] resize_mode = off|settle|continuous|debounced in
unbox.toml, hot-reloaded; pure doctested config core.
Windows are shown via <img data-attr-src> (NOT an RCSS image() decorator) so the
kernel's surface-element input-back, click-to-focus, popup placement and box
readback -- all keyed off the <img> src -- work.
host-bin passes the config path + --rml-compositing (the latter selecting server-
side decorations) through to the extensions. tasks.md records the wave.
|
|
Completes the window-manager input story.
kernel (additive): SurfaceElement::on_pressed(std::function<void()>) — the
substrate invokes it (error-isolated to the owner) when a pointer button PRESS
or touch DOWN is routed to that surface element (root or any subsurface/popup
child fires the root element's handler), in addition to the existing client
input-back forwarding. Not fired on motion/release/miss. It is the
click/tap-to-focus SIGNAL; focus policy stays the wm's.
ext-window-field: on map, sets the element's on_pressed -> that toplevel's
Toplevel::focus() (keyboard focus + on_toplevel_focused -> RCSS raise/highlight),
guarded on the window still being tracked. So a click/tap on a background window
now focuses it (the gap noted in Wave 3).
kernel + ext-window-field + ext-xdg-shell suites green; build-asan green, no new
unbox::-framed leak/UB (the stored handler dies with the element).
|
|
NEW core unit (id "window-field", depends_on "xdg-shell"), installed by host-bin
ONLY under --rml-compositing / UNBOX_RML_COMPOSITING (default off; the classic
wlr_scene path stays the default until RML compositing is signed off on hardware).
It composites application toplevels as RCSS surface elements inside ONE ui
surface (the window field) instead of as wlr_scene nodes:
- activate(): fetch ext-xdg-shell Service (typed), create the window-field
UiSurface at SceneLayer::normal sized to the primary output, subscribe to
on_output_added + on_toplevel_mapped/unmapped/focused.
- on map: Toplevel::wl_surface() -> UiSubstrate::create_surface_element(); the
toplevel is Toplevel::hide()'d out of wlr_scene (the surface element is now the
sole compositor of its pixels; the substrate drives its frame callbacks);
appended to bind_list("wins") (live_uri = source_uri(), focused, title, app_id).
- on unmap: drop the SurfaceElement + row. on focus: flip the focused flag.
- Layout/animation are RCSS (assets/ext-window-field/field.{rml,rcss}): a wrapping
flex field where the focused window dominates and the rest tile below, animated
on a transition. No geometry from C++ (the user's contract decision).
- Keyboard focus stays ext-xdg-shell's job; pointer/touch input-back is automatic
in the kernel; this unit wires no seat calls.
Wiring (orchestrator): root meson subdir, host-bin install behind the flag +
ext_window_field_dep. Headless glue test (40 assertions): map tracks the window +
drives hide(), 2nd map, focus flip via the Alt+Tab path, unmap removes it; no-GL
degrade asserted. build + build-asan green; host-bin links; no regressions.
Known gaps (change-requests): click-to-focus a BACKGROUND window needs a kernel
"surface-element pressed -> notify owner" hook (next); wallpaper needs
ext-layer-shell surface exposure (Wave 3b).
|