Repository: tauri
Issue: [bug][linux] Decorations are unresponsive if WebviewWindow is built with visible(false), then shown
Labels: type: bug,status: needs triage

### Describe the bug

**Reproduced on Gnome on both Fedora and Ubuntu** (fresh installs). I don't know about other DEs. Windows/macOS work well.

When manually building a `WebviewWindow` via its `Builder`, and setting the visibility to `false`, then once the UI is ready, call `getCurrentWindow().show()`, the window decorations are unresponsive and do nothing (panning is still possible).

Weirdly enough, the interactivity goes back after double clicking somewhere in the titlebar, like the maximize button.

### Reproduction

- remove window creation from `tauri.conf.json`
- in app setup (`main.rs`):

```
let window_builder =
                WebviewWindowBuilder::new(app, "main", WebviewUrl::App("index.html".into()))
                    .title("Museeks")
                    .visible(false) // IMPORTANT
                    .inner_size(900.0, 550.0)
                    .min_inner_size(900.0, 550.0)
                    .fullscreen(false)
                    .resizable(true)
                    .disable_drag_drop_handler()
                    .zoom_hotkeys_enabled(true)
                    .build()?;
```

- in the UI, call at some point `getCurrentWindow().show()`
- try to manipulate the decorations

### Expected behavior

The decoration should be responsive.

### Full `tauri info` output

```text
parallels@ubuntu-linux-2404:~/dev/museeks$ bun tauri info
$ tauri info

[✔] Environment
    - OS: Ubuntu 24.4.0 aarch64 (X64)
    ✔ webkit2gtk-4.1: 2.46.3
    ✔ rsvg2: 2.58.0
    ✔ rustc: 1.83.0 (90b35a623 2024-11-26)
    ✔ cargo: 1.83.0 (5ffbef321 2024-10-29)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-unknown-linux-gnu (default)
    - bun: 1.1.38

[-] Packages
    - tauri 🦀: 2.1.1
    - tauri-build 🦀: 2.0.3
    - wry 🦀: 0.47.2
    - tao 🦀: 0.30.8
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli : 2.1.0

[-] Plugins
    - tauri-plugin-log 🦀: 2.0.3
    - @tauri-apps/plugin-log : not installed!
    - tauri-plugin-shell 🦀: 2.0.2
    - @tauri-apps/plugin-shell : not installed!
    - tauri-plugin-os 🦀: 2.0.1
    - @tauri-apps/plugin-os : not installed!
    - tauri-plugin-notification 🦀: 2.0.1
    - @tauri-apps/plugin-notification : not installed!
    - tauri-plugin-fs 🦀: 2.1.0
    - @tauri-apps/plugin-fs : not installed!
    - tauri-plugin-single-instance 🦀: 2.0.2
    - @tauri-apps/plugin-single-instance : not installed!
    - tauri-plugin-dialog 🦀: 2.0.4
    - @tauri-apps/plugin-dialog : not installed!
    - tauri-plugin-window-state 🦀: 2.0.2
    - @tauri-apps/plugin-window-state : not installed!

[-] App
    - build-type: bundle
    - CSP: default-src 'none'; img-src 'self' asset: data:; media-src 'self' blob: asset: https://asset.localhost http://asset.localhost; child-src 'self'; object-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; connect-src ipc: asset: https://asset.localhost http://asset.localhost http://ipc.localhost 'self' https://api.github.com; font-src 'self' data:
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React
    - bundler: Vite
```
```


### Stack trace

_No response_

### Additional context

_No response_