A native floating window moved by its title row lies over the mark the target under it shows. Its own ghost layer paints the mark too, mapped to the same desktop place through the windows' inner rects, the mapping pointer_in uses, so the mark reads over the faded window.
AppKit keeps a window's bottom-left corner when its size changes (winit's
`request_inner_size` is `setContentSize`), so every size the app sent moved
the window's top edge by the height it gained or lost: a collapsed dock
palette expanded by its double arrow grew upward, often past the top of the
screen, and the dock then recorded that place as the user's. `act` follows
each `SetInnerSize` on macOS with the top-left corner the caller knows the
window at.
The test kit gains `AppKitWindow`, which runs window commands as AppKit
does; the macOS dock trials use it. New trials: a palette collapsed and
expanded by its double arrow, and a collapsed palette dragged by its title
row and by its group grip, on a Retina Mac.
Refs storytold/photocraft#15486
The rule under a floating window's title row takes the divider's width
in whole physical pixels on the display the window lays out on. An OS
window on another monitor (a laptop at 2x with an external display at
1x) laid its rule out at its own scale while the dock sized it at the
main window's, so the window was half a point short and cut its last
row.
DockSizes keeps the rule's width and the display scale it is for, and
at_scale gives the sizes at an OS window's own scale
(native::pixels_per_point: its monitor's scale from the window facts
with the app's zoom). DockArea::windows sizes each OS window's chrome
at that scale and hands it to FloatingGroup; in-app windows keep the
main window's.
A window's caller place now counts as a change when it moves the window
by more than half a physical pixel on its display, not half a point, so
a window that changes displays takes a one-pixel correction at 2x.
A floating group draws a divider rule under its title row
(HeaderRegion::rule), and the container lays the rule out in a band of
its own: the divider's width in whole physical pixels (0.8 pt at
125 %). DockSizes::window_chrome left that band out, so a window sized
from its content (a collapsed palette, a minimized window, a stepped
window) was one pixel short and cut the bottom of its last row.
DockSizes::title_rule is the divider rule's band from the same token
and display scale the container uses, window_chrome adds it, and
FloatingGroup takes its chrome from DockSizes, so the dock and the
group size the window with one value. The collapsed and minimized
native palette trials check that the window fits its content exactly.
A collapsed floating window is 40 pt wide, so its flyouts, the double
arrow's tooltip and the panel menu could not show inside it: the tooltip
wrapped one letter per line ("E x") and the flyouts opened outside the
window (#15861).
Every layer the overlay host shows from a palette window (a dock window
or a popup window, at WindowLevel::Palette) now shows in a popup window
of its own (WindowSpec::popup), placed in desktop points within the work
area around the palette (windows::popup_room, overlay::layer_room).
Layers from the main window stay in it; full-window layers cover their
own window.
- The popup's pass shows the layer and records it in the popup's stack,
with its focus scope and Escape/Enter/activation dismissal. The
opener's pass records an entry standing for the window
(OpenEntry::popup), so family closes, the anchor and outside presses
in the opener work as before; family closes also reach the layers in
popup windows.
- A press in another app window closes an outside-closing popup, and a
popup closes when the app loses focus.
- Popups that take keys take the OS focus and hand it back to their
opener on close; tooltips take no focus and let the pointer through.
- A layer without a measured size (a tooltip) is laid out in the popup's
pass, in the work-area room, and placed by the size it took there.
- A palette column passes no main-window bounds to its flyouts.
- The test kit keeps facts per popup window.
The window's column takes one held-height state shared with the collapsed
column: WindowColumn::held is the content height, and collapsed the strip's
own width. A column whose every group is minimized shows at its rect's place
and width with the title row and strips' height (DockSizes::minimized_height);
its sides resize the width, and WindowColumn::kept keeps the rect's height, so
an OS window's recorded placement and an in-app window's rect keep the
expanded size and a restore gives it back. Stepped columns keep fitting their
content, which already measures minimized groups as strips.
Fixesstorytold/photocraft#15862.
A collapsed dock window's sides resize its width, and only its width, within the bounds of a docked collapsed column
(DockSizes::iconic_bounds, the one rule both use), on macOS by AppKit and elsewhere by the window's own grips.
FloatingGroupOutput::collapsed_width reports the width, which the area keeps as the column's iconic width through the
docked column's own path (Action::ResizeIconic); names show from IconicSizes::labels as in a docked column. The height
stays the icons', the expanded rect keeps its size and the window keeps its edge. The column in a window has no
inner-edge divider: the window's sides size it, as for an expanded column.
- `Workspace` fields are private. `revision()` moves with every write (a clone is a
new source); `generation()` moves only on `replace` and ends drags as the old
revision did. A trial walks every `&mut self` method, read from the source.
- Panel specs and permissions leave `DockPanels` for `PanelSpecs`, a plain-data model
the host keeps in a `Tracked`. `DockArea` binds `Arc<Workspace>` and derives specs,
permissions and keys from the workspace revision, the specs revision and the lock:
an idle pass reads no spec, read-only docks included.
- `DockGrid::rail(cells)` is sized by the dock from its own tokens.
- Floating window ids come from a counter the layout owns; `replace` gives incoming
windows ids the replaced layout never gave out. The dock's global id counter and its
`no-global-state` allowlist entry are gone.
Part of #2336.
Where the app moves an OS window itself (a floating panel on Windows), each
pass placed the window from the pass's pointer event, relative to where the
window reports itself. The event can be an older sample than the window's
current place, since the window moves between passes, so the window landed
behind the pointer every pass and the release left it there: on Windows a
400 px drag moved a floating panel about 260 px, and at times only the
click distance.
Where the platform tells the system pointer, the move now places the
window from it (pointer - grab - inset), at the drag's start, on each pass
and once more at the release. Platforms without a system pointer keep the
event-based place. The new `windows::system_pointer` never falls back to
the drag's own noted pointer, which `desktop_pointer` does, so the move
cannot feed its own place back.
Part of storytold/photocraft#15478.
A collapsed native window records its expanded rect, so expanding it restores
its size; an open OS window always carries its maximum size, so a lifted strip
limit reaches the OS; a viewport is sized within its own limits; a dock opens
OS windows only where its mount would, so a float over a full-screen window is
an in-app window that moves; a native window's edge is measured and recorded
in app coordinates. The floating window's title row shows the double arrow and
Close; its menu opens from the band.
A window a drag did not start in takes the desktop pointer while the drag runs, never the place it last saw the
pointer itself: the source window holds the pointer, and the window may have had no exit (a palette laid over it).
A floating dock window whose column has steps is sized by its caller in an OS window too (Resize::by_caller): the
OS window is not OS-resizable, the app runs its grips and reports each step, the dock turns the resize into whole
steps and sends the window their rect at once. The input hook's release of an OS resize applies only to windows
the OS may resize.
The tracked macOS move sent StartMove a pass after the pointer passed the
click distance. winit hands performWindowDragWithEvent the event AppKit is
handling when the command runs, and in that later pass it is often not the
press, or none, so the drag took only some of the time.
- StartMove goes out in the band's Down pass where the OS tracks moves. The
move is reported (Begin, Update, Commit) once the system pointer has passed
the click distance; a click on the row moves and docks nothing.
- A window whose move the app runs keeps AppKit's own movable flag: the band
writes nothing for it and the end hook leaves it alone. AppKit moves such a
window for the hand-off and resizes it from its edges only while it is
movable.
A viewport window's builder carried its caller's rect every pass, and egui sent
each change of it to the window. The caller's rect follows the window's own
reports a pass late (the dock model records the OS place, a saved window reads
its store), so every OS move or resize came back as a command of the place one
pass old. While AppKit moved or live-resized a window the two writers set it to
two places in turn, without end: the title-row drag jittered, and a live resize
stretched the content with black edges.
- The builder carries the place only until the window opens.
- Each window keeps its known place: what its own pass last saw, or what act
last commanded. A caller's place goes out only where it differs from the
known place, never while a move gesture runs or the window is minimized,
maximized or full screen. Placements are recorded from the known place.
- A dock window is fitted to the monitors when it opens; an open one stays at
the placement the model recorded.
- The windows fixture sends a child the changes of its builder as commands,
as eframe does, so trials see what an integration would send.
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.
A native float's OS window opens at its placed rect; the measured size applies
only to a window sized by its content. A tab, group or window drag carries the
size it left where it started, and a float command the size of the group it
runs from: the float takes it (with the drag bar above), after a panel's own
float size and before the default. FloatSpace's never-filled group and column
records go.
A floating window's drag bar carries no title: the tabs below name the panels.
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.
DockConfig::native_windows is on by default. A float opens native where the
window host opens OS windows and reports their positions (ShellInfo::window_positions,
WindowHost::positions_reported: not on Wayland); a float never shown native opens
over its place in the main window. AppSpec::new takes the backend winit opens on.
The OS close of a native float is its Close action, taken when every panel in the
window may close; the group's open state belongs to the dock model. The gallery's
mock editor keeps its floats inside its preview.