modrinth / code

The Modrinth monorepo containing all code which powers Modrinth!
https://modrinth.com
Other
975 stars 181 forks source link

Double window decorations on Plasma 5 #1012

Open i509VCB opened 9 months ago

i509VCB commented 9 months ago

Describe the bug

Modrinth launcher has 2 sets of window decorations on Plasma 5.

Screenshot_20240121_112906

Steps to reproduce

Launch the appimage on Plasma 5.

Expected behavior

Only one set of window decorations should be visible.

I'd prefer the server's decorations be shown but only showing the modrinth decorations would be fine.

System information

(From about my system)

Operating System: Fedora Linux 39 KDE Plasma Version: 5.27.10 KDE Frameworks Version: 5.111.0 Qt Version: 5.15.11 Kernel Version: 6.6.9-200.fc39.x86_64 (64-bit) Graphics Platform: Wayland Processors: 24 × AMD Ryzen 9 3900X 12-Core Processor Memory: 62.7 GiB of RAM Graphics Processor: AMD Radeon RX 6700 XT Manufacturer: Micro-Star International Co., Ltd. Product Name: MS-7C94 System Version: 1.0

Theseus v0.6.3

Additional context

This can be worked around by using Plasma's window menu to only show modrinth's window decorations:

  1. Press Alt + F3
  2. More Actions
  3. No titlebar or frame
triphora commented 9 months ago

Do you have the "Native decorations" setting in the app disabled? I suspect that there may be something system-specific that is forcing the native taskbar, but because the Modrinth App has the "Native decorations" setting disabled, it thinks that only has its own is enabled.

P.S. I thought you left the modded community! :wink:

i509VCB commented 9 months ago

Yeah I discovered that switch to enable native decorations a bit later. I wonder if the detection mechanism for that could be improved. Although whether tauri exposes that much control is a different question.

I mean if you need someone to whip up something with wayland-rs to make the detection better I can do that (I am a maintainer over there).

triphora commented 9 months ago

There is an issue related to Wayland (#941) that we need help fixing. For whatever reason, it doesn't happen with KDE Wayland nor GNOME X11, only GNOME Wayland.

i509VCB commented 9 months ago

Seems like we can ask if the window was decorated: https://docs.rs/tauri/1.5.4/tauri/window/struct.Window.html#method.is_decorated

Something similar to the toggle_decorations to ask if the server has decorated a window might be enough to make this more accurate. If the user overrides it then sure I guess we use the user's preference.