GUI subsystem: -H=windowsgui + AttachConsole, MB_TOPMOST on test window
drover.exe is now a GUI subsystem binary:
- Double-click no longer flashes a console window — a clean
smoke-test message box opens immediately.
- When run from cmd / PowerShell, AttachConsole reattaches stdout
and stderr to the parent terminal so '--version', 'check', etc.
still print as expected.
- MB_TOPMOST flag added to MessageBox so the window can't be
obscured by other windows on launch (this was the actual cause
of "I clicked but nothing happened" reports).
Verified locally: built with GOOS=windows GOARCH=amd64 -H=windowsgui;
running drover-gui.exe --version prints to PowerShell, drover-gui.exe
gui shows the message box on top of the active window.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -38,8 +38,10 @@ func showTestWindow() {
|
||||
bodyW, _ := windows.UTF16PtrFromString(body)
|
||||
titleW, _ := windows.UTF16PtrFromString(title)
|
||||
|
||||
// MB_OK | MB_ICONINFORMATION | MB_SETFOREGROUND
|
||||
const flags = 0x00000000 | 0x00000040 | 0x00010000
|
||||
// MB_OK | MB_ICONINFORMATION | MB_SETFOREGROUND | MB_TOPMOST
|
||||
// MB_TOPMOST is essential — without it the message box can pop up
|
||||
// behind other windows and the user thinks nothing happened.
|
||||
const flags = 0x00000000 | 0x00000040 | 0x00010000 | 0x00040000
|
||||
|
||||
messageBox.Call(
|
||||
0,
|
||||
|
||||
Reference in New Issue
Block a user