Skip to main content

Module window

Module window 

Source
Expand description

Window show/hide/focus/resize/center/shadow mechanics.

These helpers operate on an already-resolved WebviewWindow. Resolving the window by label, and deciding when to call these (launch, tray click, global shortcut, …), stays in the app.

Functions§

hide
Hide the window without closing it.
is_visible
Best-effort visibility check; treats an error resolving visibility as “not visible” so callers default to showing the window.
resize_and_center
Resize window to (width, height) logical pixels, toggle its native shadow, and re-center it. A maximized window ignores set_size on Windows, so maximize is dropped first.
show_and_focus
Show, un-maximize (if needed), focus, and raise window.
toggle_maximize
Flip window between maximized and restored.