Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[window-state][v2] macOS using plugins causes apps to get stuck #1918

Closed
ayangweb opened this issue Oct 11, 2024 · 7 comments · Fixed by #2007
Closed

[window-state][v2] macOS using plugins causes apps to get stuck #1918

ayangweb opened this issue Oct 11, 2024 · 7 comments · Fixed by #2007
Labels
bug Something isn't working platform: macos macOS specific issues plugin: window-state

Comments

@ayangweb
Copy link
Contributor

ayangweb commented Oct 11, 2024

demo: https://github.com/ayangweb/test-window-state

macOS video:

The mouse is always loading, but the screen recorder doesn't record it.

10.11.2.mov

Windows video:

10.11.3.mov

More demo videos

@hut36
Copy link

hut36 commented Oct 14, 2024

Ran into the same problem. Tried to fix it and this is my investigation so far:

  • The problem is triggered by the call to is_maximized() from within restore_state()
  • The problem is caused by the call to is_maximized() from WindowEvent::Resized event handler. The tao implementation of is_zoomed() (the counterpart of is_maximized()) for MacOS sets NSWindowStyleMask::NSTitledWindowMask | NSWindowStyleMask::NSResizableWindowMask in case of no title and not resizable, which most probably causes event resized be emitted.
  • this can be verified by setting windows > decorations or windows > resizable to false in tauri.conf.json, and delete .window-state.json before running the app.

@ayangweb
Copy link
Contributor Author

I've implemented a simple version on my own for now that runs relatively stable, looking forward to fixing it soon 🌹!

EcoPasteHub/EcoPaste#677

@hut36
Copy link

hut36 commented Oct 14, 2024

Just comment out this line if you want a quick workaround.

&& !window_clone.is_maximized().unwrap_or_default()

@hut36
Copy link

hut36 commented Nov 2, 2024

Same reason: tauri-apps/tauri#5812

@1111mp
Copy link

1111mp commented Nov 4, 2024

Same problem on macos

@ayangweb
Copy link
Contributor Author

ayangweb commented Nov 4, 2024

@FabianLars @amrbashir Hey 👋, bothering you both, any progress on this issue?

@FabianLars
Copy link
Member

I looked into it only very very briefly. Maybe it makes sense to disable the is_maximzed check in the plugin for undecorated windows for now. Actually fixing the inner issue may take a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform: macos macOS specific issues plugin: window-state
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants