electron: Window snapping on Windows does not persist the window position/size after hide/show

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version: 9.3.x
  • Operating System: Windows 10 & Windows 7
  • Last Known Working Electron version: Never to my knowledge

Expected Behavior

Hiding/showing a window that’s snapped to a screen edge should not affect the window’s position/size.

Actual Behavior

Showing a window after hiding restores the window position/size to the settings from prior to the window snapping.

To Reproduce

Repro fiddle

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 9
  • Comments: 17 (12 by maintainers)

Most upvoted comments

Not stale. I really think this should be addressed. Otherwise showing the window with a global hotkey while it’s Aero-Snapped will reset the window to its previous position, or some new position which may be partially off the screen.

Not stale.

repros in v24

Still repros in Electron 21. Updated gist