Macos fullscreen & dialog support with run_return (#1581)
* Fix for fullscreen with run_return on mac * Cleanup * Removed a comment * fmt * This doesn't break exiting run_return anymore * Now you can also transition from code * Fmt & cleanup * Now using a atomic instead of a static bool * reinserted a line * Fmt * Added support for dialogs and child windows * Cargo fmt * Dialogs are now being shutdown properly * Cargo fmt * Update CHANGELOG.md
This commit is contained in:
parent
a4121a2c2e
commit
5a6cfc314e
4 changed files with 60 additions and 20 deletions
|
|
@ -19,6 +19,7 @@ use crate::{
|
|||
platform::macos::{ActivationPolicy, RequestUserAttentionType, WindowExtMacOS},
|
||||
platform_impl::platform::{
|
||||
app_state::AppState,
|
||||
app_state::INTERRUPT_EVENT_LOOP_EXIT,
|
||||
ffi,
|
||||
monitor::{self, MonitorHandle, VideoMode},
|
||||
util::{self, IdRef},
|
||||
|
|
@ -820,6 +821,8 @@ impl UnownedWindow {
|
|||
shared_state_lock.fullscreen = fullscreen.clone();
|
||||
trace!("Unlocked shared state in `set_fullscreen`");
|
||||
|
||||
INTERRUPT_EVENT_LOOP_EXIT.store(true, Ordering::SeqCst);
|
||||
|
||||
match (&old_fullscreen, &fullscreen) {
|
||||
(&None, &Some(_)) => unsafe {
|
||||
util::toggle_full_screen_async(
|
||||
|
|
@ -865,7 +868,7 @@ impl UnownedWindow {
|
|||
) => unsafe {
|
||||
util::restore_display_mode_async(video_mode.monitor().inner.native_identifier());
|
||||
},
|
||||
_ => (),
|
||||
_ => INTERRUPT_EVENT_LOOP_EXIT.store(false, Ordering::SeqCst),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue