Skip to content

win32 build: version string, GTK_CSD=0, wm-hints in vcxproj#1

Merged
MrLenin merged 3 commits into
evilnet:masterfrom
MrLenin:master
May 18, 2026
Merged

win32 build: version string, GTK_CSD=0, wm-hints in vcxproj#1
MrLenin merged 3 commits into
evilnet:masterfrom
MrLenin:master

Conversation

@MrLenin
Copy link
Copy Markdown
Collaborator

@MrLenin MrLenin commented May 17, 2026

Summary

Three Windows-build fixes:

  • win32: preserve full version string in non-numeric build fields (c769722) — meson's marketing version may carry a pre-release suffix like 3.0.0~alpha1. The build template was joining the dotted parts back into a string, dropping the suffix from PACKAGE_VERSION (About dialog, user-agent, tarball name) and the StringFileInfo block (Windows file-properties dialog). Split into $versionFull (full marketing string, used wherever a human-readable version belongs) and $versionParts (digits-only quad for Win32 VERSIONINFO's FILEVERSION/PRODUCTVERSION, which rejects non-numeric components).
  • fe-gtk: force GTK_CSD=0 on Windows (8e9b8d8) — GTK's client-side title bar confuses Windows window managers that key off the real WM_NCHITTEST frame: FancyZones can't snap a CSD window, and built-in Snap tiling misreads its drag edges. With CSD off all GTK surfaces get a real native frame; FancyZones still ignores owned child windows by default, so the only realistic snap target is whichever top-level opens first (typically the Network List on startup). g_setenv is called before gtk_init() with override=TRUE so the build behavior is consistent.
  • win32: add wm-hints.c/.h to the VS project (5f44f17) — origin's 7b570e9 introduced src/fe-gtk/wm-hints.{c,h} but only wired them up in the meson build. VS came out with six unresolved externals in maingui.obj (wm_hints_supports_sticky, get/set_sticky, get_geometry, set_position, position_on_screen). The C source is already Windows-safe (X11 paths gated on GDK_WINDOWING_X11), so the Win32 build just needs the file in the vcxproj — the persistence feature itself is dead on Windows until a GetWindowPlacement backend lands, but the build at least links.

Test plan

  • Win32 build links and runs (VS 2022, Release|x64)
  • About dialog and Windows file-properties dialog now display `3.0.0~alpha1` instead of `3.0.0`
  • FancyZones can snap the main window on launch
  • Linux/meson build still passes (CI)

🤖 Generated with Claude Code

MrLenin and others added 3 commits May 16, 2026 22:32
meson.build's marketing version may carry a pre-release suffix like
"3.0.0~alpha1".  The build template previously joined the dotted parts
back into a string, dropping the suffix everywhere it landed:
PACKAGE_VERSION (About dialog, user-agent, tarball name) and the
StringFileInfo block (Windows file-properties dialog).

Split into two values inside version-template.ps1: $versionFull keeps
the full marketing string for those human-readable fields, while
$versionParts is the digits-only form for the numeric Win32 VERSIONINFO
FILEVERSION/PRODUCTVERSION quad that rejects non-numeric components.
poxchat.sln reorder is VS-autosave noise from opening the solution.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
GTK's client-side title bar confuses Windows window managers that key
off the real WM_NCHITTEST frame — FancyZones can't snap a CSD window,
and the built-in Snap tiling misreads its drag edges.  With CSD off
all GTK surfaces (main window, dialogs, popovers) get a real native
frame from Windows; FancyZones still ignores owned child windows by
default, so the only realistic snap target is whichever top-level
opens first (typically the Network List on startup).

Set before the first gtk_init() so GTK picks it up during init; pass
override=TRUE so the build behavior is consistent regardless of user
environment.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Rubin's "persist sticky + window position" commit (7b570e9 on origin)
introduced src/fe-gtk/wm-hints.{c,h} but only added them to the meson
build — the VS solution didn't compile wm-hints.c, so maingui.obj came
out with six unresolved externals (wm_hints_supports_sticky, get/set
_sticky, get_geometry, set_position, position_on_screen).

The C source is already Windows-safe: every X11-specific path is gated
on GDK_WINDOWING_X11, so on Win32 these resolve to harmless no-op stubs
(except position_on_screen, which uses cross-platform GdkMonitor APIs).
The persistence feature itself is therefore dead on Windows until a
GetWindowPlacement/SetWindowPlacement backend lands; this commit just
restores the build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@MrLenin MrLenin merged commit 1268f78 into evilnet:master May 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant