mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
Hide main settings window instead of closing (#17960)
* Hide main settings window instead of closing * Proper closing * Create Settings window hidden if opening OOBE/SCOOBE
This commit is contained in:
@@ -15,6 +15,7 @@ namespace Microsoft.PowerToys.Settings.UI.Helpers
|
||||
internal const int SPI_GETDESKWALLPAPER = 0x0073;
|
||||
internal const int SW_SHOWNORMAL = 1;
|
||||
internal const int SW_SHOWMAXIMIZED = 3;
|
||||
internal const int SW_HIDE = 0;
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
internal static extern IntPtr GetActiveWindow();
|
||||
@@ -44,6 +45,9 @@ namespace Microsoft.PowerToys.Settings.UI.Helpers
|
||||
[DllImport("user32.dll")]
|
||||
public static extern int GetDpiForWindow(System.IntPtr hWnd);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool IsWindowVisible(IntPtr hWnd);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool AllowSetForegroundWindow(int dwProcessId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user