Expand description
Which windowing system a Linux/BSD session is running on, and what that implies for window chrome and modal windows.
Two detectors live here and they are not interchangeable:
active_window_systempredicts, from the environment, which backend winit will pick. It is only valid before a window exists — its one job is decidingWindowAttributes::with_decorations(..), which has to be chosen at window-construction time. It mirrors winit’s own precedence exactly; any divergence means Teksilo and winit disagree about the session and the chrome comes out wrong.window_system_for_display_handlereads the live handle of an already-created window. It is authoritative and should be preferred everywhere a window (or aParentHandle) is in reach — the title-bar host factory and the external-DnD backend both dispatch on it, so they can never disagree with each other or with winit.
Enums§
- Window
System - The windowing system backing a window (or the session, when predicted).
Functions§
- active_
window_ system - The window system winit is expected to use for windows created in this
process. See the module docs: this is a prediction for the pre-window-
creation decisions only. Once a window exists, prefer
window_system_for_display_handle. - attach_
child_ window - Attach
childas a child window ofparentusingNSWindowOrderingMode::Aboveon macOS. Call this after both windows’ AccessKit adapters have been created (and thus after the child becomes visible). Works for modal and non-modal parented windows alike — popover-as-window, inspector palettes, floating tool panels are all expected to route through this path as the multi-window system matures. - supports_
native_ modal_ windows - Whether a modal dialog should be presented as a real OS window rather than an in-tree overlay.
- window_
system_ for_ display_ handle - The window system a live window actually runs on, read from its raw display
handle. Authoritative — unlike
active_window_systemit cannot disagree with winit, because the handle is winit’s answer.