microsoft / microsoft/WindowsAppSDK
Suggestion: Window.Activate should call SetForegroundWindow or provide a separate SetAsForeground method which calls it
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 4.7k
- Forks
- 471
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 28
Description
When creating a single instance app, after redirection it is necessary to call the Win32 API SetForegroundWindow as well as Window.Activate to show the redirected-to window. See related issue - https://github.com/microsoft/WindowsAppSDK/issues/1439. It should not be necessary to do a DllImport and call a Win32 API. WindowsAppSDK should provide this functionality. Either Window.Activate should call it by default or provide a separate method on the Window or AppWindow class called `SetAsForeground ` or similar which calls SetForegroundWindow.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing Window.Activate and AppWindow entry points, then read related issue #1439 to understand the redirection scenario and foregrounding constraints. Decide whether Activate should call SetForegroundWindow or whether a separate SetAsForeground method is appropriate; done means the Windows App SDK provides the requested behavior without requiring consumers to use DllImport.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100