tao
tao copied to clipboard
[request] Remove client decorations (linux/wayland)
This is mostly about https://github.com/tauri-apps/tao/pull/979 / https://github.com/tauri-apps/tao/issues/977 https://github.com/tauri-apps/tauri/issues/10702
From what i've heard so far the change caused more harm then good because now tao/tauri windows behave very non-wayland like.
First of all, the Titlebar buttons shouldn't have been a reason for this PR. If wayland doesn't show min/max buttons by default that's not our problem and if users want those buttons they should use the system settings to get them back.
Then the the more important problem, the 71 error code / resizing in general.
On wayland it's a very well known issue that app windows don't restore their state, but this is not our problem to fix if wayland doesn't want us to be able to do this. I can't remember about Gnome, but KDE for example is working on this https://bugs.kde.org/show_bug.cgi?id=436318 etc
imho the better solution would have been to a) document wayland specific behavior as much as we can and b) :
- Make set_size methods fail non-panicking if they had issues (didn't find mentions of this)
- webkitgtk internal errors mentioned in #10702 either shouldn't be our concern, or we should finally add the mentioned workarounds (env vars) that also fix other issues.
- moving and resizing with the native decorations not working should really have some other fix. i can't believe that this requires client decorations because this used to work fine without them for such a long time before.
Extra refs of issues people face after #979 (will add more over time) https://discord.com/channels/616186924390023171/1328842890637607044 https://discord.com/channels/616186924390023171/1305624260479418451
As more and more distros are starting to not only ship Wayland by default, but also now drop support for x11 (Fedora 43, Ubuntu, etc) (even though xwayland is probably still here), I wonder if this move up in the backlog?
It's something I would probably like helping with, but it's really out of my comfort and knowledge zone, but please tell me if I can help in any way.
Since Gnome requires CSD, you may want to support both and make it configurable?
we'd just remove our own decorations that were added relatively recently and fall back to whatever we had before that (some gtk default behavior?) - that said, i forgot how bad the situation was in the last weeks/months before the custom decorations.
I guess the more reasonable approach would be to find a way to check if server side decorations exist/are supported and only use our csd if really needed. Ideally we'll also find some time to improve our csd as well since even on gnome they have some issues.
We can think about my initial request (removing our csd) when we switch to gtk and/or to cef.
that said, i forgot how bad the situation was in the last weeks/months before the custom decorations.
On GNOME, #979 overrides the header bar's decoration layout. Per GNOME's default, it is not desired to have anything but a close button. And for those running it with altered decoration layouts, they definitely did so on purpose – be it moving the close button to the left, or having none as seen on Linux on Mobile.
Looking through that change, it looks like it's reimplementing handling pointer device drag gestures etc. which sounds like it should be handled by GTK's header bar. While I cannot comment on the specifics of #977, as I've only tested this with Tauri v2 after this change, skimming through it, it sounds like an issue with the more restrictive geometry negotiation, Wayland is imposing on clients by design, not having to do anything with the absence of buttons.
I am using a wayland compositor Hyprland and for me window decorations are a no go, so i would like to be able to disable them maybe just give the option to enable/disable them.
I am using a wayland compositor Hyprland and for me window decorations are a no go, so i would like to be able to disable them maybe just give the option to enable/disable them.
If you simply want to remove the decoration/titlebar, you can simply set app.windows[0].decorations to false in src-tauri/tauri.conf.json
Any ETA on this?
nope. we currently have very limited time for linux specific stuff so i expect this to be part of the switch to gtk4 which has no ETA either.