Page 1 of 1

[raiguard][1.1.77] Wayland missing window decorations

Posted: Fri Mar 10, 2023 7:53 am
by Ayamari
I tried using the new SDL_VIDEODRIVER=wayland setting and it's missing all window decorations - there is no title bar, the window cannot be moved or resized.

Re: [1.1.77] Wayland missing window decorations

Posted: Fri Mar 10, 2023 11:33 am
by jodokus31
I have that, too, but I thought, I screwed something up with my Gnome.
But maybe, it's something different.

I switched back to XFCE on X11, because it running ok-ish still.

Re: [raiguard][1.1.77] Wayland missing window decorations

Posted: Wed Mar 15, 2023 5:19 am
by raiguard
Thanks for the report. It looks like Gnome doesn't support server-side window decorations on Wayland. This means that we'll have to provide our own. In the meantime, you can drag the window with super+drag, and super+right click to access the various titlebar options and resizing.

Re: [raiguard][1.1.77] Wayland missing window decorations

Posted: Thu Jul 20, 2023 2:23 pm
by raiguard
A quick update on this: I found a solution several months ago by adding libdecor to the build process, but while it works fine on our CI servers, we are unable to compile libdecor on our production build server for various reasons. I am working on some alternative solutions but it's slow going. In any case, this likely won't be fixed in 1.1 because it will require changes to the release process.

Re: [raiguard][1.1.77] Wayland missing window decorations

Posted: Fri Jul 28, 2023 5:40 am
by Ayamari
Thanks for the update!

Re: [raiguard][1.1.77] Wayland missing window decorations

Posted: Thu Mar 14, 2024 2:49 pm
by raiguard
I revisited this and figured out a way to make it work. I mistakenly thought that our build servers needed to have the libdecor dynamic library linked to the program but that is not the case - SDL optionally loads it at runtime. So I just needed to make the libdecor header available

Fixed for the next release!

Re: [raiguard][1.1.77] Wayland missing window decorations

Posted: Mon Mar 25, 2024 7:38 am
by Ayamari
Thanks for fixing this!
The window decorations are now present, and I can resize and maximize the window, even though they look different than the rest of the windows. I'm perfectly OK with this, just wanted to leave a note about this.
Decorations look different than the rest of the system.
Decorations look different than the rest of the system.
wayland.jpg (704.28 KiB) Viewed 3655 times
I don't know if that's related to this, but sometimes (on 1.1.105), if I move the window around during initial loading and/or click on the window and/or titlebar the game just closes right after it's finished loading, as if it was buffering input and that was causing some problems. I attach a log file from running the game with

Code: Select all

SDL_VIDEODRIVER=wayland ./bin/x64/factorio
but there is nothing interesting in it as far as I can tell. This only happens when running under Wayland as far as I can tell, or at least didn't easily reproduce with default settings.

There's also a problem that switching from a maximized Factorio Wayland window to another app (on second monitor) causes the maximized Factorio window to resize, I'll report that separately. 111995

Re: [raiguard][1.1.77] Wayland missing window decorations

Posted: Mon Mar 25, 2024 6:24 pm
by atomizer
Ayamari wrote: Mon Mar 25, 2024 7:38 am I don't know if that's related to this, but sometimes (on 1.1.105), if I move the window around during initial loading and/or click on the window and/or titlebar the game just closes right after it's finished loading
Sounds like https://gitlab.freedesktop.org/wayland/ ... quests/188 (with fix presumably to be merged soon)

Re: [raiguard][1.1.77] Wayland missing window decorations

Posted: Thu Mar 28, 2024 6:59 pm
by raiguard
atomizer wrote: Mon Mar 25, 2024 6:24 pm Sounds like https://gitlab.freedesktop.org/wayland/ ... quests/188 (with fix presumably to be merged soon)
Yes, and here's a Factorio thread about this issue: 105527.

Re: [raiguard][1.1.77] Wayland missing window decorations

Posted: Thu Mar 28, 2024 7:01 pm
by raiguard
Ayamari wrote: Mon Mar 25, 2024 7:38 am Thanks for fixing this!
The window decorations are now present, and I can resize and maximize the window, even though they look different than the rest of the windows. I'm perfectly OK with this, just wanted to leave a note about this.
wayland.jpg
On my system the decorations are GTK4 themed but always use the light theme. There is an open ticket in libdecor to fix this.

If Gnome would get off their high horse and implement effing server-side decorations like literally everyone else then we wouldn't have to deal with this garbage.