17 Commits
Author SHA1 Message Date
aiongg 404e03bc63 design-lint: contract/platform, contract/memory: the freedesktop icon lookup lives in craft-window (theme_svgs), so caption icons need no target cfg; desktop icons kept in a session slot; the memory rule's scope_builder test reads the builder argument, not the closure body 2026-11-16 13:22:31 +00:00
aiongg 260a64cf62 Clippy: lints the gate denies in ui-contract and window (identical if blocks, then_some, an Option mask in the icon trial, items after the test module); the it tests name epaint_default_fonts' special emojis and use Id::unique 2026-11-16 01:55:23 +00:00
aiongg 46bd564b75 top-w2: net change of 6 commits
- top-w2: written by an agent
- top-w2: finished by an agent
- top-w2: review fixes (review-1)
- top-w2: the menu-letter step of the shortcut trial types its letter as text, which mnemonics read (top run round)
- top-w2: typed letters in a menu go to the container of the focused row's level, with a trial for a title-click menu (top run round)
- top-w2: a menu row's pick walks out from the menu it runs in, with a trial for Cut from the Help search field's edit menu (top run round)
2026-11-15 04:46:09 +00:00
aiongg de5d6b3199 top-w1: net change of 2 commits
- top-w1: written by an agent
- top-w1: review fixes (review-1)
2026-11-15 04:46:09 +00:00
aiongg 38d3342ad0 framework-01-w9: net change of 8 commits
- framework-01-w9: written by an agent
- framework-01-w9: finished by an agent
- Integration: desktop.rs icon_theme module lines owed by top-w2
- framework-01-w9: review fixes (review-1)
- framework-01-w9: layer containers map placement once (review-1 item 6)
- framework-01-w9: the flyout trials read the open panel's flyout, not one fading out (fw01 round 2)
- framework-01-w9: Flyout is IconicColumn's unregistered face (fw01 round 2)
- framework-01-w9: review fixes (review-tl-1.md)
2026-11-15 04:46:05 +00:00
aiongg db29b49895 panels-w2: written from its sheet 2026-11-14 17:56:00 +00:00
aiongg ae4e2ab09e Contract stubs: stage 1 (font-catalog, i18n, keymap, platform, behavior, window) 2026-11-14 01:25:39 +00:00
aiongg a17171af48 Lints: drop the workspace missing_docs lint and warn on it in the framework crates that document every public item 2026-11-14 00:15:29 +00:00
aiongg c19abe8663 Dock a native window by dragging its title row
A floating dock group in its own OS window now moves through a window move
gesture the app runs, which reports Begin, Update, Commit and Cancel like a
layer's move, so the dock marks the target under the pointer and docks the
whole window on release.

- macOS (Caps::OS_MOVES_TRACKED): the OS moves the window (StartMove), and the
  app follows the system pointer, button and Cmd through SystemWindows, the
  running platform's WindowSystem in craft-window. The hand-off ends when the
  system reports the button up.
- X11 and Windows: the app moves the window with SetOuterPosition so the
  pressed point stays under the pointer; Escape puts it back.
- A drag started by a container shown in its own OS window follows that
  window's pointer, not its parent's.
- The runtime's end hook sets NSWindow.movable for every window; a window
  whose move the app runs is never moved by AppKit from its band.
2026-11-12 14:32:39 +00:00
aiongg 31948854ad A native dock window's own title row is its only title bar
A tool window's frame comes from policy::tool_frame, whatever frame the main
window has: Inset with the traffic lights hidden on macOS, undecorated with no
caption buttons elsewhere. The installed decision applies to the other kinds.
2026-11-12 14:32:39 +00:00
aiongg e59460135e Base crates on the framework: theme, behaviour, keymap, platform, window, settings, i18n, fonts 2026-11-12 14:09:48 +00:00
Carsten KrügerandClaude Opus 5.5 1702fe5782 window: cascade new windows on the real monitor
egui reports a monitor's size but not its place, so Viewports guessed that
monitors tile the desktop. A maximized window's corner is a few points outside
its monitor on Windows, which took a monitor up and to the left that doesn't
exist, and every window cascaded from it opened off screen. The guess is also
wrong whenever monitors differ in size or sit at other offsets.

Add Viewports::set_monitors: the app lists the monitors in physical pixels and
the driver picks the one showing most of the previous window, at that window's
scale. For apps that don't list them yet, the guess now allows for a maximized
window's frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:20:44 +01:00
aiongg f8a83e8204 craft-window: window list, cascade placement, Window menu and viewports for apps with one window per document 2026-10-25 19:09:54 +00:00
aiongg 271594c081 window: the title bar's empty area takes no keyboard focus (#334) 2026-10-25 14:36:07 -04:00
skylar taylor-barrick e5da4a7a68 M0: reconcile shared UI and updater changes with egui 0.37 2026-10-25 17:07:55 +01:00
aiongg e9824219c7 window: title_bar module for app-drawn title bars (#316)
* window: title_bar module for app-drawn title bars

The empty part of an app's top strip moves the window on drag and follows
the macOS title-bar double-click setting. A control on the strip or an
in-window Order::Middle panel over it (floating docks, egui::Window) keeps
its own drag: window_movable is false there and, on macOS, sync_movable
sets NSWindow.movable from it. No gesture acts on the window in full
screen.

* window: empty_area returns the empty area's response
2026-10-25 09:49:44 -04:00
Dylan M. Taylor 1f805378d4 feat(window): shared craft-window crate for consistent window decorations (#217)
* feat(window): shared crate deciding who draws the window frame

Add craft-window, which decides whether the desktop or the app draws the
window frame (titlebar, borders, window buttons) and applies it to an
egui ViewportBuilder. This fixes the drift where some Craft apps drew
their own titlebar on KDE while others kept KWin's.

The rule: macOS, Windows and X11 keep the desktop frame; a Wayland
compositor with zxdg_decoration_manager_v1 (KDE, Sway, Hyprland, COSMIC)
keeps its frame; one without it (GNOME) leaves the frame to the app.
<PREFIX>_TITLEBAR=app|system|desktop overrides. When the app draws the
frame, the decision carries the window-button Layout from GNOME's
button-layout so the app's header bar matches the desktop's order.

Decision logic only; drawing the buttons stays in each app. Extracted and
generalized from pdfcraft's decorations.rs. forbid(unsafe_code); default
build has no egui dependency (egui feature adds decorate()).

* style(window): rustfmt the Wayland probe and Dispatch impl

cargo fmt --check failed CI: collapse the thread-spawn builder chain and
the Dispatch::event signature onto the lines rustfmt wants (verified with
rustfmt 1.98 against the workspace rustfmt.toml).

* fix(window): address review — WAYLAND_SOCKET, bounded gsettings, checkout creds

- Skip the Wayland probe when WAYLAND_SOCKET is set: connect_to_env would
  take ownership of the inherited fd and unset the variable, closing the
  descriptor winit needs. Keep the desktop frame instead.
- Run the gsettings button-layout lookup behind the same 500 ms bounded
  worker as the Wayland probe, so a stalled gsettings can't block startup.
  Factored the worker into a shared bounded() helper.
- window.yml: set persist-credentials: false on checkout so the token
  isn't left in .git/config while cargo runs dependency build scripts.
- README: document the socket guard and the bounded gsettings lookup.

Verified with rustfmt 1.98 and clippy -D warnings (both feature sets).

* fix(window): reap the gsettings child on timeout; document probe tradeoffs

Follow-up to review: the button-layout lookup now spawns gsettings with
piped output, reads it on a worker, and kills+reaps the child whether it
finishes or times out — so a stalled gsettings leaves neither a blocked
process nor a parked worker (it is a one-shot startup call).

Also document, on the Wayland probe, that an inherited WAYLAND_SOCKET
(rare; normal launches get WAYLAND_DISPLAY) deliberately falls back to the
desktop frame to protect winit's connection — the same frame an app that
doesn't probe would get, a safe default rather than a regression.

Verified: rustfmt 1.98 clean, clippy -D warnings clean (default + egui),
tests pass.
2026-10-21 05:35:20 -04:00