mirror of
https://github.com/tauri-apps/tao.git
synced 2026-01-31 00:35:16 +01:00
fix(macOS): windows frozen when starting in fullscreen (#727)
This commit is contained in:
committed by
GitHub
parent
c5d606dffe
commit
7159466743
6
.changes/fullscreen-hang.md
Normal file
6
.changes/fullscreen-hang.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"tao": patch
|
||||
---
|
||||
|
||||
On macOS, fix window frozed when starting with fullscreen.
|
||||
|
||||
@@ -341,18 +341,7 @@ extern "C" fn window_will_close(this: &Object, _: Sel, _: id) {
|
||||
extern "C" fn window_did_resize(this: &Object, _: Sel, _: id) {
|
||||
trace!("Triggered `windowDidResize:`");
|
||||
with_state(this, |state| {
|
||||
// If window is entering/exiting, resize and move event will be emitted in
|
||||
// window_did_enter_fullscreen & window_did_exit_fullscreen.
|
||||
let in_fullscreen_transition = state
|
||||
.with_window(|window| {
|
||||
trace!("Locked shared state in `window_did_resize`");
|
||||
let shared_state = window.shared_state.lock().unwrap();
|
||||
trace!("Unlocked shared state in `window_did_resize`");
|
||||
shared_state.in_fullscreen_transition
|
||||
})
|
||||
.unwrap_or(false);
|
||||
|
||||
if !state.is_checking_zoomed_in && !in_fullscreen_transition {
|
||||
if !state.is_checking_zoomed_in {
|
||||
state.emit_resize_event();
|
||||
state.emit_move_event();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user