wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
18.06k stars 807 forks source link

Wezterm does not have window decorations/titlebar on Mutter/Wayland #4962

Open rishubn opened 9 months ago

rishubn commented 9 months ago

What Operating System(s) are you seeing this problem on?

Linux Wayland

Which Wayland compositor or X11 Window manager(s) are you using?

Mutter

WezTerm version

20240204-213233-b03b833a

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

(Ubuntu 22.04) On wayland, wezterm spawns without window decorations. It cannot be resized or dragged with the mouse like other windows. This does not appear when I log in with X11. The cursor also changes color and shape when hovering over the wezterm window

Below is a gtk app next to wezterm, notice the missing header image

To Reproduce

No response

Configuration

rnagpal@ipn078:~$ cat .config/wezterm/wezterm.lua
-- Pull in the wezterm API
local wezterm = require 'wezterm'

-- This table will hold the configuration.
local config = {}

-- In newer versions of wezterm, use the config_builder which will
-- help provide clearer error messages
if wezterm.config_builder then
  config = wezterm.config_builder()
end

-- This is where you actually apply your config choices

-- For example, changing the color scheme:
config.color_scheme = 'tokyonight-storm'
config.enable_scroll_bar = true
config.window_background_opacity = 0.9
config.default_cursor_style = "SteadyBar"
config.window_decorations = "TITLE | RESIZE"
-- and finally, return the configuration to wezterm

return config

Expected Behavior

Have the same style and functionality as other windows in wayland

Logs

rnagpal@ipn078:~$ WEZTERM_LOG=debug wezterm
11:28:44.844  DEBUG  config > Reloaded configuration! generation=1
11:28:44.845  DEBUG  codec  > encode_async GetCodecVersion size=3
11:28:44.846  DEBUG  wezterm_client::client > decoded serial 1 GetCodecVersionResponse
11:28:44.846  DEBUG  codec                  > encode_async SetClientId size=27
11:28:44.847  DEBUG  wezterm_client::client > decoded serial 0 GetPaneRenderChangesResponse
11:28:44.847  DEBUG  wezterm_client::client > decoded serial 0 SetPalette
11:28:44.849  DEBUG  wezterm_client::client > decoded serial 0 GetPaneRenderChangesResponse
11:28:44.849  DEBUG  wezterm_client::client > decoded serial 2 UnitResponse
11:28:44.850  DEBUG  codec                  > encode_async SpawnV2 size=22
11:28:44.853  DEBUG  wezterm_client::client > decoded serial 0 TabAddedToWindow
11:28:44.853  DEBUG  wezterm_client::client > decoded serial 3 SpawnResponse
11:28:44.853  INFO   wezterm_gui            > Spawned your command via the existing GUI instance. Use wezterm start --always-new-process if you do not want this behavior. Result=SpawnResponse { tab_id: 2, pane_id: 2, window_id: 2, size: TerminalSize { rows: 24, cols: 80, pixel_width: 640, pixel_height: 384, dpi: 0 } }
11:28:44.853  DEBUG  wezterm_client::client > client thread ended: Client was destroyed

The log indicates the window gets destroyed, however it is still usable

Anything else?

No response

wez commented 9 months ago

Wayland support is currently being re-implemented in main, this is an outstanding issue around that

sebakri commented 6 months ago

Had the same problem under Fedora 40. As a workaround I "disabled wayland" in wezterm's config.

config.enable_wayland = false

Hope this helps for now

codewiz commented 2 months ago

Still seeing this bug with the GNOME 47 Wayland session. Using Wezterm built today from git head.

sandikata commented 1 month ago

Same issue for me.

Gentoo, Gnome 47, Mutter 47 -> Wayland

Latest git build

cguentherTUChemnitz commented 2 weeks ago

Had the same problem under Fedora 40. As a workaround I "disabled wayland" in wezterm's config.

config.enable_wayland = false

Hope this helps for now

Sadly this workaround is a no go on high-dpi displays with fractional scaling in wayland. e.g. in gnome. The enable_wayland just produces badly blurred font rendering in this scenario.