dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

Unresponsive window decorations on wayland

Open jeancf opened this issue 10 months ago • 1 comments

Problem

When running a dioxus desktop app under Wayland, the decorations of the window do not look consistent with the other windows and the buttons (minimize, maximize, close) are unresponsive.

Steps To Reproduce

Steps to reproduce the behavior:

  • run the application with cargo run.
  • try to maximize, minimize or close the app by clicking one of the buttons on the top right corner; nothing happens.

Expected behavior

See the window with the same decoration as the other windows and be able to interact with the buttons.

Screenshots

Image

above: window when starting app with cargo run. below: window when starting app with GDK_BACKEND=x11 cargo run (xwayland). The window adopts the correct decorations from the theme and buttons are responsive.

Environment:

  • Dioxus version: 0.6.2-main
  • Rust version: rustc 1.84.0 (9fc6b4312 2025-01-07)
  • OS info:
System:
  Host: desktop1 Kernel: 6.12.10-arch1-1 arch: x86_64 bits: 64
  Desktop: KDE Plasma v: 6.2.5 Distro: Arch Linux
Graphics:
  Device-1: Advanced Micro Devices [AMD/ATI] Navi 21 [Radeon RX 6800/6800 XT
    / 6900 XT] driver: amdgpu v: kernel
  Device-2: Advanced Micro Devices [AMD/ATI] Raphael driver: amdgpu
    v: kernel
  Display: wayland server: X.org v: 1.21.1.15 with: Xwayland v: 24.1.4
    compositor: kwin_wayland driver: X: loaded: amdgpu
    unloaded: modesetting,radeon dri: radeonsi gpu: amdgpu resolution:
    1: 2560x1440~165Hz 2: 1920x1080~60Hz
  API: EGL v: 1.5 drivers: kms_swrast,radeonsi,swrast
    platforms: gbm,wayland,x11,surfaceless,device
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.3.4-arch1.1
    renderer: AMD Radeon RX 6800 XT (radeonsi navi21 LLVM 19.1.7 DRM 3.59
    6.12.10-arch1-1)
  API: Vulkan v: 1.4.303 drivers: N/A surfaces: xcb,xlib,wayland
  Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
    de: kscreen-console,kscreen-doctor gpu: amdgpu_top,lact wl: wayland-info
    x11: xdpyinfo, xprop, xrandr
  • App platform: desktop

jeancf avatar Jan 29 '25 16:01 jeancf

That is because GTK uses Client Side Decorations on wayland. that way, the decorations will be identical on all linux desktops (including ~~WMs~~ tiling compositors, like Hyprland). I'm searching for a way to turn them off too, but probably it's not an option with webkit gtk

ralencode avatar Apr 04 '25 11:04 ralencode

I can confirm this issue. Tauri 2.0 fixes the unresponsive button problem. If you maximize the window (via double clicking) the buttons start to become responsible again.

reckel-jm avatar Apr 25 '25 20:04 reckel-jm

Confirmed this is still an issue on Gnome 48 using dioxus desktop 6.3

funkemunky avatar Jul 02 '25 15:07 funkemunky

Wanted to report it, but here we are. The buttons become responsive after you maximize or minimize the window, but not if you switch between windows. The window title also doesn't change unless run under Xwayland: https://github.com/DioxusLabs/dioxus/issues/4425.

  • Linux 6.15.6, NixOS, 25.11 (Xantusia), 25.11.20250716.6e98748
  • GNOME 48.3
  • dx 0.7.0-alpha.3

Andrew15-5 avatar Jul 23 '25 09:07 Andrew15-5