Skip to main content

block_window

Function block_window 

Source
pub fn block_window(ctx: &Context) -> Option<ViewportId>
Expand description

While a modal overlay is open in another window, blocks the window being drawn: its keys and typed text are dropped this pass (nothing below reads them: neither the key dispatcher nor a widget), and a backdrop over it (the theme’s backdrop, as under a dialog) takes the pointer; a click there brings the window of the modal to the front. Call it at the start of each window’s pass, before the keys are read. Returns the window holding the modal, when this one is blocked.

A dialog opened from a detached panel’s window is shown in that window and blocks every other one, the main window included, and the other way round: every window of the application waits for the answer.