From f2bd10e8aa232f1b81a38f7071fb326d655f96e7 Mon Sep 17 00:00:00 2001 From: KoBruh <42637159+KoBruh@users.noreply.github.com> Date: Tue, 20 Oct 2026 12:12:47 +1100 Subject: [PATCH 01/14] Fix ABM_SETSTATE taskbar handle --- src/TaskbarController.Core.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/TaskbarController.Core.cs b/src/TaskbarController.Core.cs index 21a84fe..97e6434 100644 --- a/src/TaskbarController.Core.cs +++ b/src/TaskbarController.Core.cs @@ -73,11 +73,6 @@ public void ApplyVisibility(bool show) { if (!NativeMethods.IsWindow(h)) continue; - // Match Buttery Taskbar's least-invasive visibility model: one - // synchronous ShowWindow call, with Explorer left in control of the - // taskbar's own auto-hide/XAML animation and position. Do not pair - // this with SetWindowPos or force the bar back onto the monitor; those - // operations can fight Explorer mid-animation and create a flash. NativeMethods.ShowWindow(h, show ? NativeMethods.SW_SHOWNOACTIVATE : NativeMethods.SW_HIDE); } } @@ -131,8 +126,12 @@ public uint GetAppbarState() private void SetAppbarState(uint state) { + IntPtr primaryTaskbar = NativeMethods.FindWindow("Shell_TrayWnd", null); + if (primaryTaskbar == IntPtr.Zero) return; + NativeMethods.APPBARDATA data = new NativeMethods.APPBARDATA(); data.cbSize = (uint)Marshal.SizeOf(typeof(NativeMethods.APPBARDATA)); + data.hWnd = primaryTaskbar; data.lParam = new IntPtr((long)state); NativeMethods.SHAppBarMessage(NativeMethods.ABM_SETSTATE, ref data); } From 88a3ff3f4d61d7e15285857a95948ac64405c8bf Mon Sep 17 00:00:00 2001 From: KoBruh <42637159+KoBruh@users.noreply.github.com> Date: Tue, 20 Oct 2026 12:13:06 +1100 Subject: [PATCH 02/14] Sync appbar handle fix into setup payload --- bootstrap/payload/TaskbarController.Core.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bootstrap/payload/TaskbarController.Core.cs b/bootstrap/payload/TaskbarController.Core.cs index 21a84fe..d3d18a1 100644 --- a/bootstrap/payload/TaskbarController.Core.cs +++ b/bootstrap/payload/TaskbarController.Core.cs @@ -72,12 +72,6 @@ public void ApplyVisibility(bool show) foreach (IntPtr h in _taskbars) { if (!NativeMethods.IsWindow(h)) continue; - - // Match Buttery Taskbar's least-invasive visibility model: one - // synchronous ShowWindow call, with Explorer left in control of the - // taskbar's own auto-hide/XAML animation and position. Do not pair - // this with SetWindowPos or force the bar back onto the monitor; those - // operations can fight Explorer mid-animation and create a flash. NativeMethods.ShowWindow(h, show ? NativeMethods.SW_SHOWNOACTIVATE : NativeMethods.SW_HIDE); } } @@ -131,8 +125,12 @@ public uint GetAppbarState() private void SetAppbarState(uint state) { + IntPtr primaryTaskbar = NativeMethods.FindWindow("Shell_TrayWnd", null); + if (primaryTaskbar == IntPtr.Zero) return; + NativeMethods.APPBARDATA data = new NativeMethods.APPBARDATA(); data.cbSize = (uint)Marshal.SizeOf(typeof(NativeMethods.APPBARDATA)); + data.hWnd = primaryTaskbar; data.lParam = new IntPtr((long)state); NativeMethods.SHAppBarMessage(NativeMethods.ABM_SETSTATE, ref data); } From 30a823133d5095264077e5c27dacd1aa84201a1e Mon Sep 17 00:00:00 2001 From: KoBruh <42637159+KoBruh@users.noreply.github.com> Date: Tue, 20 Oct 2026 12:13:27 +1100 Subject: [PATCH 03/14] Bump test build to v1.0.1 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 3eefcb9..7dea76e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.0 +1.0.1 From ed755d861e70038ff1db503a2d6eec271d2c5d6c Mon Sep 17 00:00:00 2001 From: KoBruh <42637159+KoBruh@users.noreply.github.com> Date: Tue, 20 Oct 2026 12:13:33 +1100 Subject: [PATCH 04/14] Set assembly version to 1.0.1 --- src/SlipperyTaskbar.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SlipperyTaskbar.csproj b/src/SlipperyTaskbar.csproj index 7df1bfa..e7233a2 100644 --- a/src/SlipperyTaskbar.csproj +++ b/src/SlipperyTaskbar.csproj @@ -13,8 +13,8 @@ true true false - 1.0.0 - 1.0.0.0 + 1.0.1 + 1.0.1.0 Slippery Taskbar Hide the Windows 11 taskbar until the Windows key or shell UI intentionally reveals it. From 8af613b16e13e4032a938536e802d2526966b004 Mon Sep 17 00:00:00 2001 From: KoBruh <42637159+KoBruh@users.noreply.github.com> Date: Tue, 20 Oct 2026 12:13:45 +1100 Subject: [PATCH 05/14] Label diagnostics as v1.0.1 --- src/SlipperyContext.Diagnostics.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SlipperyContext.Diagnostics.cs b/src/SlipperyContext.Diagnostics.cs index 1081993..662670c 100644 --- a/src/SlipperyContext.Diagnostics.cs +++ b/src/SlipperyContext.Diagnostics.cs @@ -20,7 +20,7 @@ private void CopyDiagnostics() { StringBuilder b = new StringBuilder(); b.AppendLine("Slippery Taskbar C# diagnostics"); - b.AppendLine("Build: 1.0.0"); + b.AppendLine("Build: 1.0.1"); b.AppendLine("Runtime: " + Environment.Version); b.AppendLine("OS: " + Environment.OSVersion); b.AppendLine("Executable: " + Application.ExecutablePath); From bea4e4fea95cb03279fca8c95429ff04baba40a2 Mon Sep 17 00:00:00 2001 From: KoBruh <42637159+KoBruh@users.noreply.github.com> Date: Tue, 20 Oct 2026 12:13:57 +1100 Subject: [PATCH 06/14] Sync v1.0.1 diagnostics into setup payload --- bootstrap/payload/SlipperyContext.Diagnostics.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/payload/SlipperyContext.Diagnostics.cs b/bootstrap/payload/SlipperyContext.Diagnostics.cs index 1081993..662670c 100644 --- a/bootstrap/payload/SlipperyContext.Diagnostics.cs +++ b/bootstrap/payload/SlipperyContext.Diagnostics.cs @@ -20,7 +20,7 @@ private void CopyDiagnostics() { StringBuilder b = new StringBuilder(); b.AppendLine("Slippery Taskbar C# diagnostics"); - b.AppendLine("Build: 1.0.0"); + b.AppendLine("Build: 1.0.1"); b.AppendLine("Runtime: " + Environment.Version); b.AppendLine("OS: " + Environment.OSVersion); b.AppendLine("Executable: " + Application.ExecutablePath); From 5afd4fc36c0ae9b6b64a08220638746bf5772ffa Mon Sep 17 00:00:00 2001 From: KoBruh <42637159+KoBruh@users.noreply.github.com> Date: Tue, 20 Oct 2026 12:57:57 +1100 Subject: [PATCH 07/14] Force full work area refresh after auto-hide --- src/TaskbarController.WorkArea.cs | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/TaskbarController.WorkArea.cs b/src/TaskbarController.WorkArea.cs index 2c760ea..fe7171f 100644 --- a/src/TaskbarController.WorkArea.cs +++ b/src/TaskbarController.WorkArea.cs @@ -16,11 +16,35 @@ namespace SlipperyTaskbar { internal sealed partial class TaskbarController { + private bool _lastWorkAreaCorrectionSucceeded; + public void EnsureWorkAreaPolicy(bool enabled) { _originalWorkAreas.Clear(); _workAreasCaptured = false; DeleteWorkAreaState(); + _lastWorkAreaCorrectionSucceeded = false; + + if (!enabled) return; + + // ABM_SETSTATE can make Windows report the full monitor as its work area + // without forcing already-maximized windows to recalculate their maximize + // rectangle. Re-applying each monitor's full bounds through SPI_SETWORKAREA + // with SPIF_SENDCHANGE both makes the desired work area explicit and sends + // the normal system-wide work-area notification. This happens only when the + // policy is applied (startup/re-enable/Explorer recovery), never on Win-key + // taskbar show/hide transitions. + Screen[] screens = Screen.AllScreens; + if (screens.Length == 0) return; + + bool success = true; + foreach (Screen screen in screens) + { + NativeMethods.RECT full = RectFromRectangle(screen.Bounds); + if (!NativeMethods.SystemParametersInfoSetWorkArea(ref full, NativeMethods.SPIF_SENDCHANGE)) + success = false; + } + _lastWorkAreaCorrectionSucceeded = success; } private void CaptureOriginalWorkAreas() @@ -197,6 +221,7 @@ public string DescribeWorkArea() b.Append(" work=").Append(RectangleText(screens[i].WorkingArea)); } b.Append(", reservation=native-auto-hide"); + b.Append(", correction=").Append(_lastWorkAreaCorrectionSucceeded); return b.ToString(); } @@ -204,6 +229,5 @@ private static string RectangleText(Rectangle r) { return string.Format("[{0},{1},{2},{3}]", r.Left, r.Top, r.Right, r.Bottom); } - } } From 6ea728398353295bf0018b62ff89cfe5f1ec63c8 Mon Sep 17 00:00:00 2001 From: KoBruh <42637159+KoBruh@users.noreply.github.com> Date: Tue, 20 Oct 2026 12:58:18 +1100 Subject: [PATCH 08/14] Sync work area reflow fix into setup payload --- .../payload/TaskbarController.WorkArea.cs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/bootstrap/payload/TaskbarController.WorkArea.cs b/bootstrap/payload/TaskbarController.WorkArea.cs index 2c760ea..2d4aec1 100644 --- a/bootstrap/payload/TaskbarController.WorkArea.cs +++ b/bootstrap/payload/TaskbarController.WorkArea.cs @@ -16,11 +16,28 @@ namespace SlipperyTaskbar { internal sealed partial class TaskbarController { + private bool _lastWorkAreaCorrectionSucceeded; + public void EnsureWorkAreaPolicy(bool enabled) { _originalWorkAreas.Clear(); _workAreasCaptured = false; DeleteWorkAreaState(); + _lastWorkAreaCorrectionSucceeded = false; + + if (!enabled) return; + + Screen[] screens = Screen.AllScreens; + if (screens.Length == 0) return; + + bool success = true; + foreach (Screen screen in screens) + { + NativeMethods.RECT full = RectFromRectangle(screen.Bounds); + if (!NativeMethods.SystemParametersInfoSetWorkArea(ref full, NativeMethods.SPIF_SENDCHANGE)) + success = false; + } + _lastWorkAreaCorrectionSucceeded = success; } private void CaptureOriginalWorkAreas() @@ -197,6 +214,7 @@ public string DescribeWorkArea() b.Append(" work=").Append(RectangleText(screens[i].WorkingArea)); } b.Append(", reservation=native-auto-hide"); + b.Append(", correction=").Append(_lastWorkAreaCorrectionSucceeded); return b.ToString(); } @@ -204,6 +222,5 @@ private static string RectangleText(Rectangle r) { return string.Format("[{0},{1},{2},{3}]", r.Left, r.Top, r.Right, r.Bottom); } - } } From c081d8538a8d96cffcd7c144dd511548058c69c5 Mon Sep 17 00:00:00 2001 From: KoBruh <42637159+KoBruh@users.noreply.github.com> Date: Tue, 20 Oct 2026 12:58:46 +1100 Subject: [PATCH 09/14] Add maximized-window diagnostics support --- src/NativeMethods.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/NativeMethods.cs b/src/NativeMethods.cs index a5f2aac..df9b1aa 100644 --- a/src/NativeMethods.cs +++ b/src/NativeMethods.cs @@ -95,6 +95,7 @@ internal static class NativeMethods [DllImport("user32.dll", CharSet = CharSet.Unicode)] public static extern IntPtr FindWindowEx(IntPtr parent, IntPtr childAfter, string className, string windowName); [DllImport("user32.dll")] public static extern bool IsWindow(IntPtr hWnd); [DllImport("user32.dll")] public static extern bool IsWindowVisible(IntPtr hWnd); + [DllImport("user32.dll")] public static extern bool IsZoomed(IntPtr hWnd); [DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); [DllImport("user32.dll", SetLastError = true)] public static extern bool SetWindowPos(IntPtr hWnd, IntPtr insertAfter, int x, int y, int cx, int cy, uint flags); [DllImport("user32.dll")] public static extern bool GetWindowRect(IntPtr hWnd, out RECT rect); From 13ab78dd9f24196333f06a06efb8facbc6d5f457 Mon Sep 17 00:00:00 2001 From: KoBruh <42637159+KoBruh@users.noreply.github.com> Date: Tue, 20 Oct 2026 12:59:10 +1100 Subject: [PATCH 10/14] Sync maximized-window diagnostics support --- bootstrap/payload/NativeMethods.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap/payload/NativeMethods.cs b/bootstrap/payload/NativeMethods.cs index a5f2aac..df9b1aa 100644 --- a/bootstrap/payload/NativeMethods.cs +++ b/bootstrap/payload/NativeMethods.cs @@ -95,6 +95,7 @@ internal static class NativeMethods [DllImport("user32.dll", CharSet = CharSet.Unicode)] public static extern IntPtr FindWindowEx(IntPtr parent, IntPtr childAfter, string className, string windowName); [DllImport("user32.dll")] public static extern bool IsWindow(IntPtr hWnd); [DllImport("user32.dll")] public static extern bool IsWindowVisible(IntPtr hWnd); + [DllImport("user32.dll")] public static extern bool IsZoomed(IntPtr hWnd); [DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); [DllImport("user32.dll", SetLastError = true)] public static extern bool SetWindowPos(IntPtr hWnd, IntPtr insertAfter, int x, int y, int cx, int cy, uint flags); [DllImport("user32.dll")] public static extern bool GetWindowRect(IntPtr hWnd, out RECT rect); From bae9b70c8ebec79c7145391158e9d101b9874b8d Mon Sep 17 00:00:00 2001 From: KoBruh <42637159+KoBruh@users.noreply.github.com> Date: Tue, 20 Oct 2026 12:59:34 +1100 Subject: [PATCH 11/14] Add geometry diagnostics for remaining taskbar gap --- src/SlipperyContext.Diagnostics.cs | 52 ++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/src/SlipperyContext.Diagnostics.cs b/src/SlipperyContext.Diagnostics.cs index 662670c..bd94f5f 100644 --- a/src/SlipperyContext.Diagnostics.cs +++ b/src/SlipperyContext.Diagnostics.cs @@ -20,7 +20,7 @@ private void CopyDiagnostics() { StringBuilder b = new StringBuilder(); b.AppendLine("Slippery Taskbar C# diagnostics"); - b.AppendLine("Build: 1.0.1"); + b.AppendLine("Build: 1.0.2-test"); b.AppendLine("Runtime: " + Environment.Version); b.AppendLine("OS: " + Environment.OSVersion); b.AppendLine("Executable: " + Application.ExecutablePath); @@ -39,9 +39,10 @@ private void CopyDiagnostics() IList taskbars = _taskbars.RefreshTaskbars(); b.AppendLine("Taskbars found: " + taskbars.Count); IntPtr foreground = NativeMethods.GetForegroundWindow(); - b.AppendLine("Foreground: " + _taskbars.DescribeWindow(foreground)); + b.AppendLine("Foreground: " + DescribeWindowGeometry(foreground)); for (int i = 0; i < taskbars.Count; i++) - b.AppendLine("Taskbar " + i + ": " + _taskbars.DescribeWindow(taskbars[i])); + b.AppendLine("Taskbar " + i + ": " + DescribeWindowGeometry(taskbars[i])); + b.AppendLine("Maximized windows: " + DescribeMaximizedWindows()); try { @@ -54,6 +55,51 @@ private void CopyDiagnostics() } } + private string DescribeWindowGeometry(IntPtr h) + { + if (h == IntPtr.Zero) return "hwnd=0"; + StringBuilder b = new StringBuilder(_taskbars.DescribeWindow(h)); + + NativeMethods.RECT windowRect; + if (NativeMethods.GetWindowRect(h, out windowRect)) + { + b.Append(", rect=").Append(RectText(windowRect)); + } + + IntPtr monitor = NativeMethods.MonitorFromWindow(h, NativeMethods.MONITOR_DEFAULTTONEAREST); + if (monitor != IntPtr.Zero) + { + NativeMethods.MONITORINFO mi = new NativeMethods.MONITORINFO(); + mi.cbSize = Marshal.SizeOf(typeof(NativeMethods.MONITORINFO)); + if (NativeMethods.GetMonitorInfo(monitor, ref mi)) + { + b.Append(", monitor=").Append(RectText(mi.rcMonitor)); + b.Append(", nativeWork=").Append(RectText(mi.rcWork)); + } + } + return b.ToString(); + } + + private string DescribeMaximizedWindows() + { + List windows = new List(); + NativeMethods.EnumWindows(delegate(IntPtr h, IntPtr lParam) + { + if (windows.Count >= 12) return false; + if (!NativeMethods.IsWindowVisible(h) || !NativeMethods.IsZoomed(h)) return true; + windows.Add(DescribeWindowGeometry(h)); + return true; + }, IntPtr.Zero); + + if (windows.Count == 0) return "none"; + return string.Join(" | ", windows.ToArray()); + } + + private static string RectText(NativeMethods.RECT r) + { + return string.Format("[{0},{1},{2},{3}]", r.Left, r.Top, r.Right, r.Bottom); + } + protected override void ExitThreadCore() { Dispose(); From 0c9a58daf447988ae91ba0744acfe79f50532be7 Mon Sep 17 00:00:00 2001 From: KoBruh <42637159+KoBruh@users.noreply.github.com> Date: Tue, 20 Oct 2026 12:59:52 +1100 Subject: [PATCH 12/14] Sync gap geometry diagnostics into setup payload --- .../payload/SlipperyContext.Diagnostics.cs | 50 +++++++++++++++++-- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/bootstrap/payload/SlipperyContext.Diagnostics.cs b/bootstrap/payload/SlipperyContext.Diagnostics.cs index 662670c..24724ed 100644 --- a/bootstrap/payload/SlipperyContext.Diagnostics.cs +++ b/bootstrap/payload/SlipperyContext.Diagnostics.cs @@ -20,7 +20,7 @@ private void CopyDiagnostics() { StringBuilder b = new StringBuilder(); b.AppendLine("Slippery Taskbar C# diagnostics"); - b.AppendLine("Build: 1.0.1"); + b.AppendLine("Build: 1.0.2-test"); b.AppendLine("Runtime: " + Environment.Version); b.AppendLine("OS: " + Environment.OSVersion); b.AppendLine("Executable: " + Application.ExecutablePath); @@ -39,9 +39,10 @@ private void CopyDiagnostics() IList taskbars = _taskbars.RefreshTaskbars(); b.AppendLine("Taskbars found: " + taskbars.Count); IntPtr foreground = NativeMethods.GetForegroundWindow(); - b.AppendLine("Foreground: " + _taskbars.DescribeWindow(foreground)); + b.AppendLine("Foreground: " + DescribeWindowGeometry(foreground)); for (int i = 0; i < taskbars.Count; i++) - b.AppendLine("Taskbar " + i + ": " + _taskbars.DescribeWindow(taskbars[i])); + b.AppendLine("Taskbar " + i + ": " + DescribeWindowGeometry(taskbars[i])); + b.AppendLine("Maximized windows: " + DescribeMaximizedWindows()); try { @@ -54,6 +55,49 @@ private void CopyDiagnostics() } } + private string DescribeWindowGeometry(IntPtr h) + { + if (h == IntPtr.Zero) return "hwnd=0"; + StringBuilder b = new StringBuilder(_taskbars.DescribeWindow(h)); + + NativeMethods.RECT windowRect; + if (NativeMethods.GetWindowRect(h, out windowRect)) + b.Append(", rect=").Append(RectText(windowRect)); + + IntPtr monitor = NativeMethods.MonitorFromWindow(h, NativeMethods.MONITOR_DEFAULTTONEAREST); + if (monitor != IntPtr.Zero) + { + NativeMethods.MONITORINFO mi = new NativeMethods.MONITORINFO(); + mi.cbSize = Marshal.SizeOf(typeof(NativeMethods.MONITORINFO)); + if (NativeMethods.GetMonitorInfo(monitor, ref mi)) + { + b.Append(", monitor=").Append(RectText(mi.rcMonitor)); + b.Append(", nativeWork=").Append(RectText(mi.rcWork)); + } + } + return b.ToString(); + } + + private string DescribeMaximizedWindows() + { + List windows = new List(); + NativeMethods.EnumWindows(delegate(IntPtr h, IntPtr lParam) + { + if (windows.Count >= 12) return false; + if (!NativeMethods.IsWindowVisible(h) || !NativeMethods.IsZoomed(h)) return true; + windows.Add(DescribeWindowGeometry(h)); + return true; + }, IntPtr.Zero); + + if (windows.Count == 0) return "none"; + return string.Join(" | ", windows.ToArray()); + } + + private static string RectText(NativeMethods.RECT r) + { + return string.Format("[{0},{1},{2},{3}]", r.Left, r.Top, r.Right, r.Bottom); + } + protected override void ExitThreadCore() { Dispose(); From b6799c6fe783ef930a59ae2fb1300fc1e5dcef29 Mon Sep 17 00:00:00 2001 From: KoBruh <42637159+KoBruh@users.noreply.github.com> Date: Tue, 20 Oct 2026 13:00:01 +1100 Subject: [PATCH 13/14] Set v1.0.2 test version --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 7dea76e..6d7de6e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.1 +1.0.2 From 281a1c732ccfe175bddcbffabad204431025fcbe Mon Sep 17 00:00:00 2001 From: KoBruh <42637159+KoBruh@users.noreply.github.com> Date: Tue, 20 Oct 2026 13:00:12 +1100 Subject: [PATCH 14/14] Set managed test version to 1.0.2 --- src/SlipperyTaskbar.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SlipperyTaskbar.csproj b/src/SlipperyTaskbar.csproj index e7233a2..a85a330 100644 --- a/src/SlipperyTaskbar.csproj +++ b/src/SlipperyTaskbar.csproj @@ -13,8 +13,8 @@ true true false - 1.0.1 - 1.0.1.0 + 1.0.2 + 1.0.2.0 Slippery Taskbar Hide the Windows 11 taskbar until the Windows key or shell UI intentionally reveals it.