mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-10-20 23:11:24 +02:00
* fix(window-state): convert macOS coordinates to Logical to fix overlay shrink and multi-monitor DPI scaling drift * chore: add changeset for logical coordinates and macOS overlay fix * chore(window-state): fix change file package keys * fix(window-state): save the macOS content rect size instead of guessing the title bar The 20-40px outer/inner heuristic also matched ordinary decorated windows, saving their outer size so they grew by the title bar height on every restore. Derive the title bar height from the content rect instead, in one helper shared by update_state, the Resized handler and the initial metadata. * fix(window-state): keep the saved state in physical pixels State files written by earlier versions hold physical pixels, and logical coordinates are not one global space across monitors with different scale factors, so a position converted with one monitor's scale was restored on another. Converting with the window's scale at Moved time could also pick up a stale scale mid-drag, and an unavailable scale silently stored physical values as logical. * fix(window-state): check the restored position against the monitors For a maximized window the monitor check tested x and y, which are the monitor's corner, while the window was then placed at prev_x and prev_y. A window maximized after leaving a now-disconnected monitor passed the check and was restored off-screen. * test(window-state): cover repeated size and position restores in e2e Restores each window three times, also with an overlay title bar, and checks the inner and outer size (or position) still match the first save, so drift between saving and restoring accumulates and fails the test. * chore(window-state): describe the restore fixes in the change file * chore(deps): update @crabnebula/test-runner-backend to 0.3.1 0.3.0 returns a new-session response that WebdriverIO 10 rejects as not W3C, so every macOS e2e spec failed to create a session. --------- Co-authored-by: Lucas Nogueira <lucas@tauri.app>