safing/portmaster

bug: Window position changes lost during system shutdown/restart

Closed this issue · 0 comments

Problem
When the system is shut down or restarted while Portmaster is running, the current window position and size are not preserved for the next session. This happens because the tauri_plugin_window_state plugin doesn't have enough time to save the window state during forced shutdowns.

Expected Behavior
Window position and size should be preserved between application sessions, even during system shutdowns or unexpected application termination.

Current Behavior

  • Window state is only saved when the application closes normally
  • During system shutdown, the window reverts to the last previously saved position/size (not the current position)
  • Any window positioning changes made since the last normal close are lost

STR

  1. User opens Portmaster
  2. User moves/resizes the window to their preferred position
  3. System is restarted (Windows updates, power outage, etc.) before closing Portmaster normally
  4. On next startup, window appears at the old saved position, not where the user last positioned it
  5. User's recent positioning adjustments are lost