Skip to content

Commit

Permalink
fix the issue that window cannot move to top while clicking system tr…
Browse files Browse the repository at this point in the history
…ay icon
  • Loading branch information
Scighost committed Jan 16, 2024
1 parent 652e8c7 commit 1a572f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Starward/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public void EnsureMainWindow()
{
m_window ??= new MainWindow();
m_window.Activate();
m_window.Show();
}


Expand Down
1 change: 1 addition & 0 deletions src/Starward/MyWindows/WindowEx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public unsafe virtual IntPtr BridgeSubclassProc(HWND hWnd, uint uMsg, IntPtr wPa
public virtual void Show()
{
AppWindow.Show(true);
AppWindow.MoveInZOrderAtTop();
User32.SetForegroundWindow(WindowHandle);
WeakReferenceMessenger.Default.Send(new WindowStateChangedMessage(false));
}
Expand Down

0 comments on commit 1a572f0

Please sign in to comment.