You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been building a macOS app on floem and have been carrying fixes on the perch branch of my fork (https://github.com/criccomini/floem/tree/perch). Each fix is one commit on top of main, and the commit messages explain the bug and the fix in detail. Most come with a headless test.
Two are already open as PRs (#1087, #1088). I'm happy to open PRs for the rest, one per fix or grouped however you'd like. If you don't want some of these upstream, tell me and I'll leave them off.
criccomini/floem@c335fa9: An exec_after / exec_after_animation_frame timer whose view is removed before it fires panics in ViewId::root. It now uses try_root.
Event dispatch
criccomini/floem@7e55da9: Hover events arrive in reverse order, Enter before Leave, because flush_pending_events routes newest first. A view that stays under the pointer can also get Enter then Leave and end up with is_hovered false. Hover now has its own queue, routed in order. A view in both the old and new hover path gets neither event. This restores the behavior from before Box tree event #1033.
criccomini/floem@8a763ea: FocusGained arrives before FocusLost. Moving focus from one text box to another leaves IME off in the box that now has focus.
criccomini/floem@aad05d3: A drop target that hangs outside its parent gets DragTargetLeave followed by DragTargetEnter when the pointer crosses the parent's edge, even though the pointer never left the target.
criccomini/floem@cf49243 + criccomini/floem@5cbdfc9 (test): handle_pointer_state_updates declares its own START_TIME static, so presses and releases are timed on different clocks. That breaks the 100ms cross-view click check.
criccomini/floem@13a21f4: On macOS, Control+click is reported as a left click. Every native app treats it as a secondary click.
Editor / text input
criccomini/floem@ae9a97c: A double click selects only up to where you clicked, because the pointer move macOS sends before the release drags the selection end back. A drag after a double or triple click now extends by word or by line.
criccomini/floem@8a1d5ab: Alt+arrow moves the cursor by a word but also runs the default focus navigation, so focus jumps to a neighboring button.
criccomini/floem@203af49: The editor's ensure_visible closure tracks the style signal, so any restyle (hover, resize, theme) scrolls the caret back into view.
criccomini/floem@d89ff99: The editor uses is_primary_pointer() to detect a left click. That checks the pointer device, not the button, so a right press collapses the selection and leaves the editor in drag mode after a context menu closes.
criccomini/floem@958053f: The text leaf's minimum width is its longest word, so one long word makes every line wrap at that word's width. Separately, the min-content probe's height gets cached at the wrong width, which gave one code block 42,000px of height.
vger renderer
criccomini/floem@b36f64a: vger has a single scissor, and clear_clip removes all clipping. After the first clipped child, the rest of a scroll's content paints outside the viewport. Clips now go on a stack, as in the tiny-skia and skia renderers.
criccomini/floem@376ba68: Glyphs are rasterized at the fractional position of whichever draw asks first, with y inverted and negative fractions mishandled. Letters in one word end up at two heights. The baseline is now rounded and each quarter-pixel bin is rasterized the same way every time.
criccomini/floem@8526b9e: The glyph cache is keyed on the blob id only, so faces in one .ttc, and a variable font at different weights, share glyphs.
criccomini/floem@8346821: swash works out the outline's winding across all contours at once, so faux bold thins glyphs whose first contour is small (SF Mono's i, about 90 other glyphs in SF Mono, some in SF Pro and Fira Sans). This commit does the embolden itself, with FreeType's per-contour winding.
Other
criccomini/floem@70364c5: ShowBarsWhenIdle = false hides the scrollbars permanently. It now shows them while scrolling or hovering and fades them out afterward, as the docs describe.
criccomini/floem@3c23067 (feature): Sets the opsz variation axis to the font size, like CSS font-optical-sizing: auto. Without it, SF Pro renders its display cut at 12–16px.
I've been building a macOS app on floem and have been carrying fixes on the
perchbranch of my fork (https://github.com/criccomini/floem/tree/perch). Each fix is one commit on top ofmain, and the commit messages explain the bug and the fix in detail. Most come with a headless test.Two are already open as PRs (#1087, #1088). I'm happy to open PRs for the rest, one per fix or grouped however you'd like. If you don't want some of these upstream, tell me and I'll leave them off.
Crashes
RegisterListenerfor a view removed earlier in the same update batch leaves a dead id, and the nextcommit_box_treepanics ("all view ids are created with a root"). (Ignore listener registrations for removed views, and prune dead ids before layout broadcasts #1087)SetImeAllowedunwraps the window's reply, so focusing a text input panics when IME is unavailable, including in every headless test. (fix: do not panic when the window cannot provide an IME #1088)exec_after/exec_after_animation_frametimer whose view is removed before it fires panics inViewId::root. It now usestry_root.Event dispatch
flush_pending_eventsroutes newest first. A view that stays under the pointer can also get Enter then Leave and end up withis_hoveredfalse. Hover now has its own queue, routed in order. A view in both the old and new hover path gets neither event. This restores the behavior from before Box tree event #1033.handle_pointer_state_updatesdeclares its ownSTART_TIMEstatic, so presses and releases are timed on different clocks. That breaks the 100ms cross-view click check.Editor / text input
ensure_visibleclosure tracks the style signal, so any restyle (hover, resize, theme) scrolls the caret back into view.is_primary_pointer()to detect a left click. That checks the pointer device, not the button, so a right press collapses the selection and leaves the editor in drag mode after a context menu closes.Layout
autotracks can add up to more than their container (Grid: don't grow tracks past their limits during space distribution DioxusLabs/taffy#1001). API change: alignment enums became constants, e.g.AlignItems::CENTER.vger renderer
clear_clipremoves all clipping. After the first clipped child, the rest of a scroll's content paints outside the viewport. Clips now go on a stack, as in the tiny-skia and skia renderers..ttc, and a variable font at different weights, share glyphs.i, about 90 other glyphs in SF Mono, some in SF Pro and Fira Sans). This commit does the embolden itself, with FreeType's per-contour winding.Other
ShowBarsWhenIdle = falsehides the scrollbars permanently. It now shows them while scrolling or hovering and fades them out afterward, as the docs describe.opszvariation axis to the font size, like CSSfont-optical-sizing: auto. Without it, SF Pro renders its display cut at 12–16px.