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: closed
  • Created 6 years ago
  • Reactions: 12
  • Comments: 29 (21 by maintainers)

Most upvoted comments

@Nantris i submitted a CL upstream: https://chromium-review.googlesource.com/c/chromium/src/+/6330848 that should address this! Once it’s accepted I’ll open some backports to Electron.

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.

Bump. Would really love to see this addressed.

Not stale.

Friendly bump. It would be great if this could be supported.

repros in v24

Still repros in Electron 21. Updated gist