wez / wezterm

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

[wayland] Wezterm .desktop file always launches new instance #2041

Closed 1player closed 2 years ago

1player commented 2 years ago

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

Linux Wayland

WezTerm version

wezterm 20220526-164715-509fd98b (latest nightly)

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

(Stable is unaffected)

I have WezTerm pinned to my GNOME dock. Every time I click on it, it starts a new instance, instead of raising the previous one. I see the previous instance in the dock as an "unknown" application (i.e. it's not using the WezTerm icon).

Can't reproduce when enable_wayland = false

To Reproduce

No response

Configuration

enable_wayland = true

Expected Behavior

No response

Logs

No response

Anything else?

No response

wez commented 2 years ago

I can't reproduce this. It sounds like Gnome/Mutter may have gotten confused. Can you try restarting the desktop environment?

1player commented 2 years ago

Nope, still the same after logging out and back in. I'm on Fedora 36 GNOME with no particular extension or modification. Never happened on stable, I upgraded to nightly just before I opened this issue.

wez commented 2 years ago

I'm running on the same OS/configuration and this doesn't happen for me. Are there really no logs with any interesting information?

1player commented 2 years ago

No real difference in the logs.

So, I've opened the GNOME looking glass inspector (Alt-F2, enter lg).

When Wayland is disabled, under the inspector Windows screen it shows wmclass = org.wezfurlong.wezterm. When Wayland's enabled, it shows wmclass = null, which might be the reason GNOME gets confused. No idea why that happens. So I guess the actual issue is "wmclass is undefined when Wayland is enabled."

Here's my config:

local wezterm = require 'wezterm';
-- removed my keybind configuration for simplicity
return {
  exit_behavior = "Close",
  show_tab_index_in_tab_bar = false,
  hide_tab_bar_if_only_one_tab = true,
  use_resize_increments = true,
  enable_wayland = false # or true,
  enable_scroll_bar = true,
  font = wezterm.font("Noto Sans Mono", {stretch="Condensed"}),
  font_size = 13,
  freetype_interpreter_version=40,
  freetype_load_flags = "NO_HINTING",
  freetype_load_target = "Light",
  color_scheme = "Afterglow",
}
wez commented 2 years ago

image

It is set for me here. How did you install wezterm?

1player commented 2 years ago

I downloaded wezterm-nightly-fedora36.rpm from https://wezfurlong.org/wezterm/install/linux.html and dnf install ./wezterm-nightly-fedora36.rpm

#sha256sum
7816866e018fc9514db7887d9d3ba5f77f773290fc49ed36735241d86914c255  Downloads/wezterm-nightly-fedora36.rpm
1player commented 2 years ago

Sorry for double posting, but I tried the latest nightly, and it's OK now. Still broken if I downgrade to the previous one.

wezterm-20220526_164715_509fd98b-1.fc36.x86_64 -- broken wezterm-20220527_194712_c4a248f1-1.fc36.x86_64 -- OK

I'll close for now.

wez commented 2 years ago

Probably related to #1727; one of the workarounds in an earlier iteration was to unmap a surface. I would expect that to only matter if you had display scaling set to something other than 100%

1player commented 2 years ago

I am in fact using 200% scaling.

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.