Skip to content

gpui_linux: Set _NET_WM_NAME on X11 window creation to support UTF-8 titles#51909

Merged
kubkon merged 1 commit intozed-industries:mainfrom
Vastargazing:fix/51871-settings-title-encoding
Mar 25, 2026
Merged

gpui_linux: Set _NET_WM_NAME on X11 window creation to support UTF-8 titles#51909
kubkon merged 1 commit intozed-industries:mainfrom
Vastargazing:fix/51871-settings-title-encoding

Conversation

@Vastargazing
Copy link
Copy Markdown
Contributor

@Vastargazing Vastargazing commented Mar 19, 2026

Context

On Linux X11, the Settings window title was displayed as garbled text
("Zed â██ Settings") in taskbars and window previews due to incorrect
character encoding.

Root cause: During X11 window creation, only WM_NAME was set with
type STRING (Latin-1). The em-dash character (U+2014) in "Zed — Settings"
is a multi-byte UTF-8 sequence (0xE2 0x80 0x94), which Latin-1 cannot
represent correctly.

Fix: Also set _NET_WM_NAME with type UTF8_STRING during window
creation, consistent with how set_title() already handles subsequent
title updates.

Fixes #51871

image image

Release Notes:

  • Fixed window title displaying garbled characters (e.g. "Zed â██ Settings") on Linux X11 due to missing UTF-8 encoding for the _NET_WM_NAME property.

…tle support

When creating an X11 window, only WM_NAME was set with type STRING
(Latin-1), causing UTF-8 characters (e.g. em-dash in \"Zed — Settings\")
to render as garbled bytes in taskbars and window previews.

Fix: also set _NET_WM_NAME with UTF8_STRING during window creation,
consistent with how set_title() already handles subsequent title updates.

Fixes zed-industries#51871
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 19, 2026
@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Mar 19, 2026
@zed-codeowner-coordinator zed-codeowner-coordinator bot requested review from a team, Veykril and kubkon and removed request for a team March 19, 2026 08:21
@maxdeviant maxdeviant changed the title fix(gpui_linux): set _NET_WM_NAME on X11 window creation for UTF-8 ti… gpui_linux: Set _NET_WM_NAME on X11 window creation to support UTF-8 titles Mar 19, 2026
Copy link
Copy Markdown
Member

@kubkon kubkon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, thanks!

@kubkon kubkon enabled auto-merge (squash) March 25, 2026 06:05
@kubkon kubkon merged commit b5e85c8 into zed-industries:main Mar 25, 2026
43 checks passed
@Vastargazing Vastargazing deleted the fix/51871-settings-title-encoding branch March 25, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Character in title of settings window is not encoded properly

2 participants