Skip to main content

set_screens

Function set_screens 

Source
pub fn set_screens(screens: Vec<Screen>)
Expand description

Tells egui-pop the screens, for the windows of this thread (the one running the event loop and the application’s frames). A host that runs the event loop itself (eframe on its own winit loop, without the create-native feature) reads the monitors and calls it: before the main window is created (so its kept place is repaired against them, repair_builder), and again when they change (a scale factor changed, a window moved to another monitor). egui-pop’s native runner calls it the same way. Windows opened after the call (detached panels, application windows) are repaired against the screens given; an empty list says none are known (only sizes are bounded).

Each application of the thread follows the change from its main window’s next pass: a screen gone is said as pop.screen.removed, a new one as pop.screen.added (by name; crate::bus::ScreenRemoved), and every window on a screen gone moves onto one that is left, a detached panel’s window docking back (pop.window.place).