Skip to content

fix(native): name the window lich so the dock groups it under lich's icon - #839

Merged
omartelo merged 1 commit into
mainfrom
fix/native-window-class
Oct 19, 2026
Merged

omartelo merged 1 commit into
mainfrom
fix/native-window-class

Conversation

@omartelo

Copy link
Copy Markdown
Collaborator

A user on Pop!_OS reported that the native window opens as a separate dock entry with a generic icon instead of under lich's.

Gio takes the Wayland app_id and the X11 WM_CLASS from app.ID, which defaults to the binary's name, lich-native. No .desktop entry claims that; build/linux/lich.desktop claims lich (StartupWMClass=lich), the class the web window already uses.

  • lich-native sets app.ID to lich, or lichdev under LICH_DEV, mirroring the web window's windowTarget so compositor rules for the daily driver never capture the dev window.
  • On Windows, Gio uses the same ID as the window class name; nothing else registers lich.

Verification

  • gofmt, go vet ./cmd/lich-native/ and the new TestWindowClass pass.
  • Not checked in a real GNOME dock yet; the fix follows Gio's os_wayland.go (xdg_toplevel_set_app_id(ID)) and os_x11.go (XSetClassHint with ID).

…icon

Gio takes the Wayland app_id and the X11 WM_CLASS from app.ID, which
defaults to the binary's name. lich-native matches no .desktop entry, so
GNOME docks (reported on Pop!_OS) showed the native window as a separate
app with a generic icon beside lich's own. build/linux/lich.desktop claims
"lich" (StartupWMClass=lich), the class the web window already uses.

The dev window takes "lichdev" under LICH_DEV, as the web one does, so
compositor rules for the daily driver never capture it. On Windows, Gio
uses the same ID as the window class name; nothing else registers "lich".
@omartelo
omartelo merged commit a82d62a into main Oct 19, 2026
10 checks passed
@omartelo
omartelo deleted the fix/native-window-class branch October 19, 2026 17:40
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