From 97d795f7f9360b713da54412285815326df3e2c4 Mon Sep 17 00:00:00 2001 From: Yao Jingxi <23722032@bjtu.edu.cn> Date: Sat, 14 Nov 2026 18:23:08 +0800 Subject: [PATCH] fix(windows): give wmSetTitle its own message number Upstream's wmSetSize and the fork's wmSetTitle (#1) both took 0x8052, so the window procedure's switch has a duplicate case once both are on main (#16) and the Windows platform package does not compile. wmSetTitle moves to 0x8053, the next number no private message uses. --- internal/platform/windows/title_windows.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/platform/windows/title_windows.go b/internal/platform/windows/title_windows.go index e8959a93..a8661ba3 100644 --- a/internal/platform/windows/title_windows.go +++ b/internal/platform/windows/title_windows.go @@ -9,8 +9,10 @@ import ( // wmSetTitle asks the window thread to apply the title SetTitle stored. // SetWindowTextW from another thread would send WM_SETTEXT and wait for the -// window thread, so the change is posted instead. -const wmSetTitle = 0x8052 +// window thread, so the change is posted instead. Its number is the next free +// one after wmSetSize (0x8052): the window procedure switches on every private +// message, and two of them with one number do not compile. +const wmSetTitle = 0x8053 var setWindowText = user.NewProc("SetWindowTextW")