mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
fix(desktop): restore saved window geometry on launch (#1554)
Signed-off-by: Wes <wesbillman@users.noreply.github.com> Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
This commit is contained in:
@@ -84,17 +84,9 @@ pub fn run() {
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.plugin(
|
||||
tauri_plugin_window_state::Builder::default()
|
||||
// The main window should always launch edge-to-edge in the
|
||||
// available desktop area. Do not let stale saved geometry or
|
||||
// fullscreen state override the maximized launch config.
|
||||
.with_state_flags(
|
||||
StateFlags::all()
|
||||
& !(StateFlags::VISIBLE
|
||||
| StateFlags::POSITION
|
||||
| StateFlags::SIZE
|
||||
| StateFlags::MAXIMIZED
|
||||
| StateFlags::FULLSCREEN),
|
||||
)
|
||||
// Visibility is excluded: the window starts hidden and the
|
||||
// frontend shows it once ready.
|
||||
.with_state_flags(StateFlags::all() & !StateFlags::VISIBLE)
|
||||
.build(),
|
||||
)
|
||||
.plugin(tauri_plugin_websocket::init())
|
||||
|
||||
Reference in New Issue
Block a user