Skip to content

GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.

feat(infra): add `SetWindowPos` method from Windows API

Lars Bergere9f5c1548db3
diff --git a/LarsWM.Infrastructure/WindowsApi/WindowsApiService.cs b/LarsWM.Infrastructure/WindowsApi/WindowsApiService.cs
index 3eaec349..0d505205 100644
--- a/LarsWM.Infrastructure/WindowsApi/WindowsApiService.cs
+++ b/LarsWM.Infrastructure/WindowsApi/WindowsApiService.cs
@@ -133,6 +133,9 @@ namespace LarsWM.Infrastructure.WindowsApi
[DllImport("user32.dll", EntryPoint = "GetWindowLongPtr")]
public static extern IntPtr GetWindowLongPtr64(IntPtr hWnd, int nIndex);
+ [DllImport("user32.dll", SetLastError = true)]
+ public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, SWP uFlags);
+
[DllImport("user32.dll")]
public static extern IntPtr BeginDeferWindowPos(int nNumWindows);