microsoft / microsoft/PowerToys
Registry Preview window doesn't remember maximized state
- Dominant language
- C
- Stars
- 139k
- Forks
- 8.6k
- PR merge metrics
- PR metrics pending
Description
### Microsoft PowerToys version
0.98.0
### Installation method
Microsoft Store
### Area(s) with issue?
Registry Preview
### Steps to reproduce
1. Open Registry Preview
2. Maximize window
3. Close
4. Open again
The window should remember it's maximized state last time it had been closed and open maximized next time but it doesn't.
### ✔️ Expected Behavior
When window was maximized last time it had been closed it should remember this state and also open maximized next time:
### ❌ Actual Behavior
Window is not maximized. The size is like it would be when maximized but it is actually shown ["normal"](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-showwindow#:~:text=SW_SHOWNORMAL-,SW_NORMAL,-1) not maximized. The position seems to be some default value. (The bottom and right part of window is off-screen.)
### Additional Information
As far as i understand the "maximized" case is simply not implemented:
https://github.com/microsoft/PowerToys/blob/ed47bceac281f5df7d98d2fde1048fa90101a9c6/src/modules/registrypreview/RegistryPreview/MainWindow.Events.cs#L16-L32
https://github.com/microsoft/PowerToys/blob/ed47bceac281f5df7d98d2fde1048fa90101a9c6/src/modules/registrypreview/RegistryPreview/RegistryPreviewXAML/MainWindow.xaml.cs#L51-L81
Contributor guide
Research direction
Start with the linked sections of src/modules/registrypreview/RegistryPreview/MainWindow.Events.cs and src/modules/registrypreview/RegistryPreview/RegistryPreviewXAML/MainWindow.xaml.cs. Trace how the window state is restored, then verify the fix by maximizing Registry Preview, closing it, reopening it, and confirming it opens maximized without being positioned off-screen.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100