alacritty: Alacritty + Wayland title bar bug

System

OS: Arch Linux Version: 0.7.1 after update, but also on 0.6.0 Linux/BSD: GNOME on Wayland

Description

After update xorg-xwayland from 1.20.0.r800.ge4a9f0bb4-1 to 1.20.0.r811.gf08ab719d-1 Got an issue with title bar. (it’s not disabled in config)

How it looks now image

What expected (screenshot of other terminal) image

Tested on X11, works fine. So I’m sure it’s Wayland. This issue seems only on alacritty, titlebar on other apps looks fine.

Also gnome screenshot not captures alacritty’s titlebar on window screenshot (may be it will be helpful)

And alacritty doesn’t create log, there is ALACRITTY_LOG variable, but file doesn’t exists.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 15
  • Comments: 32 (15 by maintainers)

Commits related to this issue

Most upvoted comments

If this is indeed not an Alacritty bug, is there any solution at all? It’s a bit jarring to have a single application with a radically different title bar from everything else, especially because its a different color and has no text. I’m just hiding the title bar for now, but would prefer to have it showing.

Complain to your DE, it’s their fault.

Titlebar looks just like intended, you can thank gnome for that.

I’ve given up as well, I’ve gotten too tired of the “not my problem” attitude, especially around Gnome. Luckily there are plenty of other terminal options that support Gnome on Wayland.

@thornjad I think it’s Gnome who have not-my-problem attitude, don’t they? At least that’s how I feel about it. Notice that even the apps that do work around this and do try to match the gnome-style decorations, it’s always off. I think Qt apps do this (at least Qutebrowser does, I’m assuming it’s on Qt side but might be wrong here) but it’s clear that it’s rendered differently, and it shows. It’s just a difficult problem, and imo not how this should work at all. If Plasma or Sway can provide decorations, I don’t see why Gnome couldn’t. Anyway, that’s how I see it; I’m not affiliated with either project but as a user, this is how I see it.

Mind you, I would like Alacritty to just work as I would expect, but I try to be reasonable, and I understand that the devs need to be selective about what they use their (probably very limited) resources for. And I appreciate all the hard work they have put into this application that we all can use for free.

Also, as I mentioned before, you can always try using it with xwayland by running: WAYLAND_DISPLAY= alacritty. It worked just fine for me when I tried it. All the terminals that “support Gnome on Wayland” probably run through xwayland anyway, don’t they?

Given that Alacritty is the only app which has this issue (that I’ve seen), it seems logical that there must be something that can be done. With Ubuntu moving to Wayland by default next month, I think this issue is only going to get more attention.

FYI, this is not a solution but rather a temporary workaround, but you can execute Alacritty with WAYLAND_DISPLAY= alacritty (note: setting the env var to empty). At least in my case it works.

@thornjad There are really two separate issues here. The lack of title text is a toolkit bug, and has been fixed upstream.

The inconsistent styling is another matter. GNOME do not consider decoration inconsistency to be a bug, nor the solution as adopted by KDE and Sway as worthwhile and so you’re left with the prospect of either slavishly emulating the detected desktop environment’s native look, or rewriting your application to use the native toolkit for each desktop environment you want to support. A hard dependency on GTK is not going to happen in a million years, but if you can pull something a bit saner off, feel free to try to get it into https://github.com/Smithay/client-toolkit

If this is indeed not an Alacritty bug, is there any solution at all? It’s a bit jarring to have a single application with a radically different title bar from everything else, especially because its a different color and has no text. I’m just hiding the title bar for now, but would prefer to have it showing.

I think I’m giving up…

If you’re using some form of tiling on wayland with a DE (Gnome with popshell for example), adding decorations: none under the window tag in the config file will remove all borders and the title bar and provide a clean looking terminal.

Just for my own posterity, you can set the env var WINIT_UNIX_BACKEND to x11 to force it to use the xwayland path & decorate the window correctly. I.e,

env WINIT_UNIX_BACKEND=x11 alacritty

Using wayland just not to use wayland. This should not be the solution nor workaround.

is there any news?

Mind you, I would like Alacritty to just work as I would expect, but I try to be reasonable, and I understand that the devs need to be selective about what they use their (probably very limited) resources for. And I appreciate all the hard work they have put into this application that we all can use for free.

Using wayland just not to use wayland. This should not be the solution nor workaround.

The upcoming release of alacritty might have better decorations that are more GNOME like https://github.com/rust-windowing/winit/pull/2263

At least they would have some sort of text rendering and such and look reasonable. I agree that not having title bar text isn’t ideal like it’s now.

Titlebar looks just like intended, you can thank gnome for that.

But it’s fine on other applications. And was working fine with Alacritty before.

You could modify the Desktop Entry (The desktop shortcut) to force it to use the xwayland path & decorate the window correctly. You can find it in the .local/share folder or wherever your os stores the desktop entry NB : I use Arch , hope it works for others too

Alacritty.desktop

[Desktop Entry]
Type=Application
TryExec=alacritty
Exec=env WINIT_UNIX_BACKEND=x11 alacritty
Icon=Alacritty
Terminal=false
Categories=System;TerminalEmulator;

Name=Alacritty
GenericName=Terminal
Comment=A fast, cross-platform, OpenGL terminal emulator
StartupWMClass=Alacritty
Actions=New;

X-Desktop-File-Install-Version=0.26

[Desktop Action New]
Name=New Terminal
Exec=alacritty

It’s fine on applications using GTK, yes. Alacritty isn’t using GTK.

We will also only ever be able to integrate with things that want to be integrated. If another application plays hard to get, you should reevaluate your software choice and maybe switch to something that plays along.

Just for my own posterity, you can set the env var WINIT_UNIX_BACKEND to x11 to force it to use the xwayland path & decorate the window correctly. I.e,

env WINIT_UNIX_BACKEND=x11 alacritty