tauri-apps / tauri

Build smaller, faster, and more secure desktop and mobile applications with a web frontend.
https://tauri.app
Apache License 2.0
84.63k stars 2.54k forks source link

[bug] data-tauri-drag-region Double click on Mac OS to directly freeze #6988

Open JCAlways opened 1 year ago

JCAlways commented 1 year ago

Describe the bug

Double click on Mac OS to directly freeze image

Reproduction

No response

Expected behavior

No response

Platform and versions

[✔] Environment
    - OS: Mac OS 13.3.1 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.69.0 (84c898d65 2023-04-16)
    ✔ Cargo: 1.69.0 (6e9a83356 2023-04-12)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 18.15.0
    - yarn: 1.22.19
    - npm: 9.5.0

[-] Packages
    - tauri [RUST]: 1.3.0
    - tauri-build [RUST]: 1.3.0
    - wry [RUST]: 0.24.1
    - tao [RUST]: 0.16.0
    - @tauri-apps/api [NPM]: not installed!
    - @tauri-apps/cli [NPM]: 1.3.1

[-] App
    - build-type: bundle
    - CSP: default-src 'self'; img-src 'self' asset: https://asset.localhost
    - distDir: http://localhost:3000/
    - devPath: http://localhost:3000/

Stack trace

No response

Additional context

No response

wusyong commented 1 year ago

Thanks for reporting the issue. It would be great if you could provide steps to reproduce. My attempt seems fine so far on macOS.

JCAlways commented 1 year ago

This is my screen recording. After running the tauri, I double clicked on the custom header to start the main card turning circle. Normally, double clicking will maximize it, and there is no problem on Windows

video

error.txt

This is my code ↓

https://github.com/JCAlways/tauri

JCAlways commented 1 year ago

image

Brendonovich commented 1 year ago

We've also observed this happening in Spacedrive. Running it in dev and double clicking anywhere near the top of the screen causes a freeze, and it only happens when data-tauri-drag-region is used.

wusyong commented 1 year ago

Thanks for all your feedbacks. I can reproduce in your repo, but I couldn't recreate it with any minimal example. I tired to add the window decoration in, for example, hello world example in tauri repo but it seems fine. I'm looking for any minimum example that can reproduce it.

wusyong commented 1 year ago

Ok I managed to recreate it. Looks like sending maximizing request through ipc caused freeze. But I couldn't recreate it in wry v0.24.

And tauri v2 seems working fine too. Not sure what's the cause in tauri v1.

1zilc commented 1 year ago

same problem

1zilc commented 1 year ago

@wusyong Here is the minimal repo I created that reproduces the issue, https://github.com/1zilc/tauri-drag-region-repo

# Cargo.toml
tauri-build@2.0.0-alpha.4
tauri@2.0.0-alpha.8

# package.json
@tauri-apps/cli@2.0.0-alpha.8
@tauri-apps/api@2.0.0-alpha.3
goenning commented 1 year ago

I had the same issue today, reverting to tauri 1.2.5 fixed it though

goenning commented 1 year ago

This combination seems to work well for me!

tauri = "1.4.1"
wry = "0.24.3"
meadowsys commented 1 year ago

I'm also having this issue unfortunately, on 2.0.0-alpha.11, contrary to what @wusyong said earlier about it working fine in v2.

tauri info:

[✔] Environment
    - OS: Mac OS 14.0.0 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.69.0-nightly (d962ea578 2023-02-26)
    ✔ Cargo: 1.69.0-nightly (9d5b32f50 2023-02-22)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: nightly-2023-02-27-aarch64-apple-darwin (overridden by '.../rust-toolchain.toml')
    - node: 18.14.2
    - pnpm: 8.6.12
    - yarn: 1.22.19
    - npm: 9.8.1

[-] Packages
    - tauri [RUST]: 2.0.0-alpha.11
    - tauri-build [RUST]: 2.0.0-alpha.8
    - wry [RUST]: 0.31.1
    - tao [RUST]: 0.22.2
    - @tauri-apps/api [NPM]: 2.0.0-alpha.6
    - @tauri-apps/cli [NPM]: 2.0.0-alpha.11

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../.output/public
    - devPath: http://localhost:3000/
    - framework: Vue.js (Nuxt)
    - bundler: Webpack

I will note some things i've noticed aren't accurate: my computer is arm64 not x64, and my bundler is vite, not webpack

utkubakir commented 8 months ago

I wanted to check in on the progress of this issue. For users used to double-clicking the top bar to maximize, the current behavior can be quite annoying...

Link to repository

pewsheen commented 7 months ago

I can't reproduce it with the latest 2.0 beta. Does anyone else still have the issue with current beta?

denjell-crabnebula commented 7 months ago

I cannot reproduce with latest 2.0 beta either (double clicking expands or contracts the window as expected).