tauri-apps / tao

The TAO of cross-platform windowing. A library in Rust built for Tauri.
Apache License 2.0
1.5k stars 177 forks source link

WindowBuilder::with_decorations(false) doesn't work on wayland kde. #899

Open jibejb opened 3 months ago

jibejb commented 3 months ago

Describe the bug decoration set false doesn't work on Wayland KDE. When running the example "decorations" (example/decorations.rs), press "space", the window decoration shluld disappear, then press "space" again, the window decoration should appear. But it only works on X11 or wayland gnome. When using KDE Wayland, the window decoration (including titlebar) always shown, even press "space" again and again. Steps To Reproduce

  1. clone tao repo.
  2. cd tao directory.
  3. GDK_BACKEND=wayland cargo run --example decorations

    set "GDK_BACKEND=wayland" environment variable and run decorations example then press "space" key.

Expected behavior When press "space" key, the window decorations (including the titlebar) disappear. Press the "space" key again the window decorations appear.

Screenshots If applicable, add screenshots to help explain your problem.

Platform and Versions (please complete the following information): OS: Archlinux x86_64 KDE plasma 6 Rustc: 1.77.1 (7cf61ebde 2024-03-27) Additional context

https://github.com/tauri-apps/tauri/issues/6562

https://gitlab.gnome.org/GNOME/gtk/-/issues/5479

jibejb commented 3 months ago

I have changed the gtk3 source code according to #https://gitlab.gnome.org/GNOME/gtk/-/issues/5479 and compile the gtk3. This problem seems to be solved in gtk3 application and gtk-rs application. But when I link the customed gtk3 lib to tao(by using LD_LIBRARY_PATH), It doesn't work with tao, tao still has this bug.

jibejb commented 3 months ago

I have tested it on Windows subsystem for Linux. It works well on wsl wayland, but doesn't work on wsl x11. Very strange.