Skip to content

gpui_linux: Set _NET_WM_NAME during X11 window creation#51899

Merged
mikayla-maki merged 1 commit intozed-industries:mainfrom
OmChillure:fix-character-not-encoded-properly
Mar 19, 2026
Merged

gpui_linux: Set _NET_WM_NAME during X11 window creation#51899
mikayla-maki merged 1 commit intozed-industries:mainfrom
OmChillure:fix-character-not-encoded-properly

Conversation

@OmChillure
Copy link
Copy Markdown
Contributor

Context

On X11, the Settings window title displayed as "Zed â██ Settings" instead of "Zed — Settings". The em-dash (U+2014) was garbled because the window creation path only set the legacy WM_NAMEproperty (Latin-1 encoded), but never set_NET_WM_NAME(UTF-8). Modern taskbars prefer_NET_WM_NAME, so without it they fell back to WM_NAME` and misinterpreted the UTF-8 bytes as Latin-1.

set_title() already sets both properties, which is why windows that update their title after creation (like the main workspace) were unaffected.

The fix adds _NET_WM_NAME during window creation, matching what set_title() already does.

Closes #51871

How to Review

Single change in crates/gpui_linux/src/linux/x11/window.rs focus on the new _NET_WM_NAME property being set alongside the existing WM_NAME in X11Window::new.

Self-Review Checklist

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Video

Screencast.from.2026-03-19.11-19-45.webm

Release Notes:

  • Fixed garbled characters in window titles on Linux X11 (e.g., Settings window)

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 19, 2026
@zed-codeowner-coordinator zed-codeowner-coordinator bot requested a review from a team March 19, 2026 05:54
@zed-community-bot zed-community-bot bot added the guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions label Mar 19, 2026
@zed-codeowner-coordinator zed-codeowner-coordinator bot requested review from Veykril and kubkon and removed request for a team March 19, 2026 05:54
@mikayla-maki mikayla-maki enabled auto-merge (squash) March 19, 2026 06:16
@mikayla-maki mikayla-maki merged commit 08d7810 into zed-industries:main Mar 19, 2026
40 of 43 checks passed
@mikayla-maki
Copy link
Copy Markdown
Member

Thank you!

AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 20, 2026
…es#51899)

#### Context

On X11, the Settings window title displayed as `"Zed â██ Settings"`
instead of "Zed — Settings"`. The em-dash (U+2014) was garbled because
the window creation path only set the legacy `WM_NAME` property (Latin-1
encoded), but never set `_NET_WM_NAME` (UTF-8). Modern taskbars prefer
`_NET_WM_NAME`, so without it they fell back to `WM_NAME` and
misinterpreted the UTF-8 bytes as Latin-1.

`set_title()` already sets both properties, which is why windows that
update their title after creation (like the main workspace) were
unaffected.

The fix adds `_NET_WM_NAME` during window creation, matching what
`set_title()` already does.

#### Closes zed-industries#51871

#### How to Review

Single change in `crates/gpui_linux/src/linux/x11/window.rs` focus on
the new `_NET_WM_NAME` property being set alongside the existing
`WM_NAME` in `X11Window::new`.

#### Self-Review Checklist

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

#### Video

[Screencast from 2026-03-19
11-19-45.webm](https://github.com/user-attachments/assets/ff810e37-90ac-4ce2-a8f5-ad83e66aa3b8)


Release Notes:

- Fixed garbled characters in window titles on Linux X11 (e.g., Settings
window)
toshmukhamedov pushed a commit to toshmukhamedov/zed that referenced this pull request Mar 20, 2026
…es#51899)

#### Context

On X11, the Settings window title displayed as `"Zed â██ Settings"`
instead of "Zed — Settings"`. The em-dash (U+2014) was garbled because
the window creation path only set the legacy `WM_NAME` property (Latin-1
encoded), but never set `_NET_WM_NAME` (UTF-8). Modern taskbars prefer
`_NET_WM_NAME`, so without it they fell back to `WM_NAME` and
misinterpreted the UTF-8 bytes as Latin-1.

`set_title()` already sets both properties, which is why windows that
update their title after creation (like the main workspace) were
unaffected.

The fix adds `_NET_WM_NAME` during window creation, matching what
`set_title()` already does.

#### Closes zed-industries#51871

#### How to Review

Single change in `crates/gpui_linux/src/linux/x11/window.rs` focus on
the new `_NET_WM_NAME` property being set alongside the existing
`WM_NAME` in `X11Window::new`.

#### Self-Review Checklist

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

#### Video

[Screencast from 2026-03-19
11-19-45.webm](https://github.com/user-attachments/assets/ff810e37-90ac-4ce2-a8f5-ad83e66aa3b8)


Release Notes:

- Fixed garbled characters in window titles on Linux X11 (e.g., Settings
window)
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 23, 2026
…es#51899)

#### Context

On X11, the Settings window title displayed as `"Zed â██ Settings"`
instead of "Zed — Settings"`. The em-dash (U+2014) was garbled because
the window creation path only set the legacy `WM_NAME` property (Latin-1
encoded), but never set `_NET_WM_NAME` (UTF-8). Modern taskbars prefer
`_NET_WM_NAME`, so without it they fell back to `WM_NAME` and
misinterpreted the UTF-8 bytes as Latin-1.

`set_title()` already sets both properties, which is why windows that
update their title after creation (like the main workspace) were
unaffected.

The fix adds `_NET_WM_NAME` during window creation, matching what
`set_title()` already does.

#### Closes zed-industries#51871

#### How to Review

Single change in `crates/gpui_linux/src/linux/x11/window.rs` focus on
the new `_NET_WM_NAME` property being set alongside the existing
`WM_NAME` in `X11Window::new`.

#### Self-Review Checklist

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

#### Video

[Screencast from 2026-03-19
11-19-45.webm](https://github.com/user-attachments/assets/ff810e37-90ac-4ce2-a8f5-ad83e66aa3b8)


Release Notes:

- Fixed garbled characters in window titles on Linux X11 (e.g., Settings
window)
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 guild Pull requests by someone in Zed Guild. 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

3 participants