From 401d0d80c838a4e71d708004f67a598673e9bb26 Mon Sep 17 00:00:00 2001 From: leafOfTree Date: Sat, 17 Oct 2026 20:20:54 +0800 Subject: [PATCH 1/3] Mark local builds as 0.0.0-dev instead of an old release version Builds made without a tag no longer report a stale release number in the tray, settings window and crash logs. The release workflow still stamps the tag's version. --- WtProgram/WtProgram.fsproj | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/WtProgram/WtProgram.fsproj b/WtProgram/WtProgram.fsproj index 34ebba59..3b42aff5 100755 --- a/WtProgram/WtProgram.fsproj +++ b/WtProgram/WtProgram.fsproj @@ -7,8 +7,9 @@ WindowTabs Resources\Bemo.ico app.manifest - - 2026.10.10-beta.1 + + 0.0.0-dev false WindowTabs From d78e9eb9b2f4d5728ac17f6cbe5fc20ef5f32023 Mon Sep 17 00:00:00 2001 From: leafOfTree Date: Sat, 17 Oct 2026 20:20:54 +0800 Subject: [PATCH 2/3] Show the same tab titles under a debugger as in release builds Debug builds no longer prefix each tab title with its window handle when a debugger is attached. --- WtProgram/WindowGroup.fs | 16 +--------------- tests/GroupLifecycle.fsx | 2 -- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/WtProgram/WindowGroup.fs b/WtProgram/WindowGroup.fs index 1d4e34d7..74e35d02 100755 --- a/WtProgram/WindowGroup.fs +++ b/WtProgram/WindowGroup.fs @@ -9,15 +9,6 @@ open System.Threading open System.Windows.Forms open Bemo.Win32.Forms -module TabTitle = - /// Release titles stay clean even when launched through a debugger. - let display (debuggerAttached:bool) (hwnd:IntPtr) (text:string) = -#if DEBUG - if debuggerAttached then sprintf "%X - %s" hwnd text else text -#else - text -#endif - module TabNavigation = /// Right neighbour in tab order, or the left one when the closed tab was last. let neighbour (order:IntPtr list) closed = @@ -529,16 +520,11 @@ type WindowGroup(enableSuperBar:bool, plugins:List2, initialAppearance: /// The tab's name as the user reads and edits it: their own, else the window's. member this.tabName hwnd = Services.program.getWindowNameOverride(hwnd).def(this.windowName hwnd) - /// Debug builds show the window handle under a debugger, for display only. - member private this.hwndText hwnd = - let text = this.tabName hwnd - TabTitle.display System.Diagnostics.Debugger.IsAttached hwnd text - member private this.getTabInfo(hwnd) = let window = this.os.windowFromHwnd(hwnd) let small,big = StartupTrace.measure "group.icons" (fun () -> iconCache.get(hwnd)) { - text = this.hwndText hwnd + text = this.tabName hwnd isRenamed = this.isRenamed hwnd iconSmall = small iconBig = big diff --git a/tests/GroupLifecycle.fsx b/tests/GroupLifecycle.fsx index 7af29d4e..b5a44b93 100644 --- a/tests/GroupLifecycle.fsx +++ b/tests/GroupLifecycle.fsx @@ -20,8 +20,6 @@ let pumpUntil description predicate = check satisfied description let main() = - check (TabTitle.display false (IntPtr(0x123)) "Editor"="Editor") "Normal tab titles contain a window handle" - check (TabTitle.display true (IntPtr(0x123)) "Editor"="123 - Editor") "Debug builds lost the debugger-only window handle" // Explorer windows 1 and 3 are on desktop 1, window 4 on desktop 2; window 5's desktop is unknown. let desk1, desk2 = Guid.NewGuid(), Guid.NewGuid() let pathOf (hwnd:IntPtr) = if hwnd = IntPtr(2) then "chrome.exe" else "explorer.exe" From f220702c3fa8c86f8266c8b19b66d505ef7c8b32 Mon Sep 17 00:00:00 2001 From: leafOfTree Date: Sun, 18 Oct 2026 10:50:43 +0800 Subject: [PATCH 3/3] Drop the release smoke check for the removed debugger tab title --- tests/ReleaseSmoke.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/ReleaseSmoke.cs b/tests/ReleaseSmoke.cs index 486d2fe0..6667c1aa 100644 --- a/tests/ReleaseSmoke.cs +++ b/tests/ReleaseSmoke.cs @@ -37,10 +37,6 @@ private static int Main(string[] args) Application.EnableVisualStyles(); assembly.GetTypes(); // Resolve signatures, including statically linked dependencies. Console.WriteLine("Release smoke: types resolved"); - var tabTitle = assembly.GetType("Bemo.TabTitle", true).GetMethod("display"); - foreach (var debuggerAttached in new[] { false, true }) - if ((string)tabTitle.Invoke(null, new object[] { debuggerAttached, new IntPtr(0x123), "Editor" }) != "Editor") - throw new Exception("Release tab titles expose a window handle under a debugger"); var dpiHelper = typeof(Form).Assembly.GetType("System.Windows.Forms.DpiHelper", true); if (!(bool)dpiHelper.GetProperty("EnableDpiChangedMessageHandling", BindingFlags.NonPublic | BindingFlags.Static).GetValue(null, null)) throw new Exception("Forms would not rescale on a monitor with another scale");