Closed DannyJJK closed 2 years ago
It may be because the popup window that is supposed to show the info is created on another thread. MacOS tends to want ui stuff on the main thread. I can however not test this as I do not own a mac.
It sounds plausible, thanks for responding anyway. I understand that testing things on macOS isn't really possible without owning a Mac
I'm on Archlinux, the app would crash if I click the "About" button twice. The crash site is at this line: https://github.com/bekker/msgbox-rs/blob/master/src/linux.rs#L18
Guess we need to remove the thread that creates the msgbox
. As per the gtk crate's documentation:
The thread where init was called is considered the main thread. OS X has its own notion of the main thread and init must be called on that thread. After successful initialization, calling any gtk or gdk functions (including init) from other threads will panic.
Yeah the msgbox crate has to go. I think I am going to create a crate for spawning popup windows with winit and egui. Then we can use message passing to allow a popup window to exist while not blocking the main thread.
Winit does not currently support creating child/popup windows after the event loop has started. This means we either have to create all windows at startup and keep them hidden until they are needed or we can use the egui windows and no native windows.
I think using egui windows like for the crop/resize/help menu is the least yanky option avaliable.
@DannyJJK Would it be possible for you to try the latest build from github actions? I am trying a different kind of popup I need to know if it works on MacOS.
@Kl4rry This works correctly now on macOS using the build from github actions:
Very nice. Thanks for the help!
Simp 3.0.0 OS: macOS Monterey 12.5.1 (21G83) Hardware: MacBook Pro 13-inch, 2019
Going to the menu bar and going to Help > About and clicking it, crashes the app.
I'm running the app from the terminal, which shows:
But a macOS application crash window is displayed as well, displaying this info: