Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions WtProgram/WindowGroup.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -529,16 +520,11 @@ type WindowGroup(enableSuperBar:bool, plugins:List2<IPlugin>, 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
Expand Down
5 changes: 3 additions & 2 deletions WtProgram/WtProgram.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
<RootNamespace>WindowTabs</RootNamespace>
<ApplicationIcon>Resources\Bemo.ico</ApplicationIcon>
<ApplicationManifest>app.manifest</ApplicationManifest>
<!-- The release workflow overrides this from the tag: dotnet build -c Release -p:Version=2026.10.10 -->
<Version>2026.10.10-beta.1</Version>
<!-- The release workflow sets the version from the tag (-p:Version=2026.10.10); any
other build reports 0.0.0-dev so it is never mistaken for a release. -->
<InformationalVersion Condition="'$(Version)' == ''">0.0.0-dev</InformationalVersion>
<!-- Shown to users (tray, settings, crash log), so no "+commit" suffix. -->
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<AssemblyTitle>WindowTabs</AssemblyTitle>
Expand Down
2 changes: 0 additions & 2 deletions tests/GroupLifecycle.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 0 additions & 4 deletions tests/ReleaseSmoke.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Loading