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
windowto(width, height)logical pixels, toggle its native shadow, and re-center it. A maximized window ignoresset_sizeon Windows, so maximize is dropped first. - show_
and_ focus - Show, un-maximize (if needed), focus, and raise
window. - toggle_
maximize - Flip
windowbetween maximized and restored.