You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perry/ui: option to start window maximized / fullscreen on launch #1280
Add an API to launch a perry/ui window in the maximized (or fullscreen) state, instead of the explicit width/height it currently requires. Requested for Windows in discussion #1232, but should work cross-platform.
Current state
The window-creation API only accepts a fixed size:
macOS backend (crates/perry-ui-macos/src/lib_ffi/window_misc.rs): mirrors the same surface.
Searching the workspace for maximize, maximized, zoom, fullscreen, SW_MAXIMIZE, WS_MAXIMIZE, showMaximized, windowState returns no hits — there is no programmatic way to start maximized today. The Win32 backend already uses ShowWindow but never with SW_MAXIMIZE/SW_SHOWMAXIMIZED.
Proposed shape
TypeScript-side, something like:
constapp=createApp({title: "My App",windowState: "maximized",// "normal" (default) | "maximized" | "fullscreen"});
Behind the scenes:
Windows: call ShowWindow(hwnd, SW_SHOWMAXIMIZED) on first show (or fullscreen via removing WS_OVERLAPPEDWINDOW and resizing to the monitor rect).
macOS: NSWindow.zoom(_:) for maximize / toggleFullScreen(_:) for fullscreen, called from the MainThreadMarker path.
Linux/GTK4 (if in scope): gtk_window_maximize / gtk_window_fullscreen.
Width/height should remain optional; if both are provided alongside windowState: "maximized", the maximized state wins on launch but the saved restore size honors them.
Activity
feat(ui): #1280 App({ windowState }) — start maximized / fullscreen (#…