alacritty/alacritty

GNOME 45.2 Maximized/Fullscreen startup broken on Wayland

Porkepix opened this issue · 11 comments

For bug reports, the following information can help speed up the process. Please
describe the bug that you have found and what you would expect to happen
instead.

System

OS: Linux
Version: 0.13.0
Gnome on Wayland

Logs

No troubleshooting section explaining how to gather debug logs (although I'm not sure what they'd show here).

Steps to reproduce:

On Gnome/Wayland, I could reproduce the issue with a minimal config file only containing only this:

[window]
startup_mode = "Maximized"

Note that the issue also happens when setting it to Fullscreen.

Documentation also mentions a SimpleFullscreen option on https://alacritty.org/config-alacritty.html but trying to set this throw a configuration error and this option seems to not be recognized (anymore?), so I don't know if the documentation is wrong, or alacritty should recognize it and doesn't.

EDIT: This is a regression from 0.12.x, I just migrated the config and found out this issue while it had no problem right before.

EDIT2: Found out that SimpleFullscreen in only for mac, is there a way for the error message to specify it; I guess doc can also be updated, although I'm not sure what's the best way to show this information there.

Are you saying the Alacritty window is invisible, or is it creating an invisible window in addition to the Alacritty window?

Are you saying the Alacritty window is invisible, or is it creating an invisible window in addition to the Alacritty window?

I'm not sure what your question means, but here's what I could see (or actually not see):

  • After update to 0.13 and as I still had 0.12 Alacritty running, using my shortcut to open a new one seemed to do nothing. Absolutely nothing could be seen happening. After some search, I actually found that Gnome was considering more windows of Alacritty were existing (when using the shortcut to switch between them), but had an empty preview, and nothing shown on the expose mode;
  • After that I tried to launch Alacritty's process from another terminal. It was acting like it was waiting for something and some process was running and ongoing, but absolutely nothing printed in the terminal, and nothing showing up. Other observations from first points are still valid;
  • Ended up trying an empty config and reneabling little piece by little piece my own, until I could isolate that without the startup_mode option or with it set to default's Windowed mode, there was no issue, but with it set to the other options, it was creating ghost windows: no terminal, no decorations, nothing (but the windows are still considered as created, and can be inspected from Gnome's looking glass)

EDIT: From more tests requested by @chrisduerr on IRC, problem doesn't exist if window is maximized or fullscreen toggle by the Window Manager or through Alacritty's keybinds: it's only through the startup_mode.

which gnome version are you using and could you bisect? It works just fine for me regardless of startup mode.

This patch should workaround the issue, though, I won't add it because I'm not adding workarounds for bugs in every compositor.

diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs
index 3b3d8297..ccfbecd3 100644
--- a/alacritty/src/event.rs
+++ b/alacritty/src/event.rs
@@ -1413,8 +1413,7 @@ impl input::Processor<EventProxy, ActionContext<'_, Notifier, EventProxy>> {
                         self.ctx.update_cursor_blinking();
                         self.on_focus_change(is_focused);
                     },
-                    WindowEvent::Occluded(occluded) => {
-                        *self.ctx.occluded = occluded;
+                    WindowEvent::Occluded(_) => {
                     },
                     WindowEvent::DroppedFile(path) => {
                         let path: String = path.to_string_lossy().into();