tauri icon indicating copy to clipboard operation
tauri copied to clipboard

Cannot drag tauri app window on MacOS when titleBarStyle is set to Overlay

Open cgaege opened this issue 10 months ago • 2 comments

Describe the bug

On MacOS Sonoma, I cannot move the application window of my tauri app when titleBarStyle is set to Overlay:

tauri.conf.json

 "windows": [
      {
        "title": "tauri-app",
        "width": 800,
        "height": 600,
        "titleBarStyle": "Overlay"
      }
    ]

Reproduction

  1. Generate a minimal tauri app (accept all default values) npm create tauri-app@latest

  2. Run npm install in tauri-app cd tauri-app npm install

  3. Edit src-tauri/tauri.conf.json and add titleBarStyle: Overlay to the windows property section:

"windows": [
      {
        "title": "tauri-app",
        "width": 800,
        "height": 600,
        "titleBarStyle": "Overlay"
      }
    ],
  1. Run tauri app npm run tauri dev

Faulty behaviour: The application window cannot be moved.

Expected behavior

Expected behaviour: The application window can be moved.

Full tauri info output

npm run tauri info

> [email protected] tauri
> tauri info


[⚠] Environment
    - OS: Mac OS 14.4.1 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.75.0 (82e1608df 2023-12-21) (Homebrew)
    ✔ cargo: 1.75.0
    ⚠ rustup: not installed!
      If you have rust installed some other way, we recommend uninstalling it
      then use rustup instead. Visit https://rustup.rs/
    ⚠ Rust toolchain: couldn't be detected!
      Maybe you don't have rustup installed? if so, Visit https://rustup.rs/
    - node: 21.5.0
    - npm: 10.2.4

[-] Packages
    - tauri [RUST]: 1 (no lockfile)
    - tauri-build [RUST]: no manifest (no lockfile)
    - wry [RUST]: no manifest (no lockfile)
    - tao [RUST]: no manifest (no lockfile)
    - @tauri-apps/api [NPM]: 1.5.3
    - @tauri-apps/cli [NPM]: 1.5.11

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:1420/
    - bundler: Vite

Stack trace

No response

Additional context

No response

cgaege avatar Apr 18 '24 21:04 cgaege

This might be related to https://github.com/tauri-apps/tauri/issues/4316

cgaege avatar Apr 18 '24 21:04 cgaege

This might be related to 4316

Maybe, did you add the data-tauri-drag-region attribute the issue was talking about to your titlebar-ish element? Just making sure cause you didn't mention it, but it is required to be able to move your app.

FabianLars avatar Apr 22 '24 10:04 FabianLars