A Save on macOS that offers two or more file types showed rfd's panel,
which allows every type's extension but has no menu to pick one, and
answered without a picked type. A document saved from such a panel kept
the suggested extension unless the user typed another one.
- macos.rs: such a Save is a sheet made with a Format menu (the panel's
accessory view, set before the sheet begins). The menu lists each type
by name with the suggested name's type chosen. Choosing a type puts its
extensions first in the allowed types and changes the extension in the
name field. The answer is `Saved` with the chosen type in `filter`, so
the save flow's picked-type rules apply as they do for the portal.
- format_menu.rs: the rules, tested on every platform: which types the
menu lists, distinct item titles, the renamed name, the allowed
extensions, and the type an answer reports (an extension the user typed
for another listed type wins; a name the panel kept with the suggested
extension keeps the chosen type).
- craft-appkit: `save_panel::new_save_panel` (nil from AppKit is `None`)
and `save_panel::on_choose` (a pop-up menu's action as a closure).
- `FileDialog::format_label` and `FilePanels::set_format_label` set the
menu's label in the app's language ("Format:" when unset).
Every pass's end hook dropped the per-viewport records of viewports its input did not list. That list dates from the
frame's start, so the root's end hook dropped the records of a window the frame had opened. A palette that opened
hidden under an open menu lost the note that it was hidden, and stayed hidden once the menu was gone: Float in a docked
tab's menu left no window to see when the opening frame ran a second pass. The root's begin hook now drops the records
of closed viewports in a frame's first pass, where the list names every window opened before.
The OS gives an OS window no press that went down in another window, so DockArea::continue_move had no effect
on a window the dock opens as one. The window shows in the app window while the press moves it: it follows the
pointer, marks where it would land and docks on release, as a tab drag does.
A dock panel's OS window gets its keys alone, so an Escape pressed there with
nothing focused became that window's Cancel, which no app code reads: a command
started from a floated palette could not be cancelled. The end hook hands a Cancel
left in such a window (`WindowSpec::hands_on_cancel`) to the window it was opened
from, which reads it as its own in its next pass. A popup or a modal open in the
floated window keeps the Escape, and a modal that opened meanwhile drops it.
An unclaimed press surrendered the focus of a canvas declared with
host_canvas at the press (apply_press), and egui's click-away rule took
a focus the app itself had given the canvas at the release. The press
rule now keeps a declared canvas focused, and the begin hook takes the
focus on it off egui's rule, whoever gave it. A canvas the app no longer
declares follows egui's rule again.
Splitter dividers keep key focus where it was on a press, but the pages column
bar and margin handles share the same declare and lost press focus with it, so
a click on a column bar divider no longer let the arrow keys step it (the
pages setup trial an_arrow_moves_the_focused_divider_one_step_and_shift_ten
failed). divider::declare_focusing declares a divider whose press takes focus,
as next's declare did, and the two value controls use it.
One conflict, in docs/ui-docking.md: next added bullets for tab presses keeping
key focus and for floating windows stacking with app windows next to our
split-handle bullet. Kept our split-handle sentence (a pointer press or drag on
a handle leaves key focus) and next's two new bullets after it.
The Rust files merged cleanly. next still has dividers that take focus on a
press, the flyout room limited to the space below its top, and no RailTool
icon, so none of this branch's changes is covered by next.
A canvas widget in an invisible Ui, which egui disables, is not reported as disabled
(WidgetRect::visible). A declaration that takes over a focused canvas's automatic stop
applies its key filter alone (nav::focus_act): the opener of the layer around it and the
recorded arrival stay.
A root's response reports the clicks on its parts too, so outside an arena a click on the arrow read as a click on
the main part and fired the bound command. The font manager's install buttons read the new signal.
The runtime keeps its surrender rule on the focus it gave an app's own widget
until no pointer button is down, so the release of the press that gave the
focus does not take it back. The record of the given focus ends once egui's
focus is elsewhere. Whether a widget is drawn is read from egui's widgets of
the running pass, for the given focus and for `host_canvas` findings alike.
Focus given to a canvas before `host_canvas` registers it follows the canvas's
keys.
A canvas drawn in a disabled `Ui` is a `canvas-without-widget` finding too;
the finding's text is made only when it is kept, and a fault is logged once.
A widget drawn with the bare Sense::DRAG or Sense::CLICK is not focusable, and
egui takes the focus from it when it is drawn, so Tab is lost there too. The
end hook reads the sense of the canvas's widget and names it in the finding.
Focus that Tab, F6 or a framework request gave an app's own egui widget
kept the runtime's surrender rule (Never) while the runtime's press rule
left that widget to egui, so a press elsewhere released it nowhere. The
end hook of the pass that drew the widget leaves the focus to egui's rule,
the app's `surrender_focus_on`; until then the press or click of the pass
that gave the focus does not take it back. The stop of an app's own widget
sets no Escape filter, so Escape releases it as egui does; the declared
canvas keeps its filter.