macOS: Run tasks synchronously on main thread instead of asynchronously (#2574)

* Close windows synchronously on main thread

* Set style mask synchronously on main thread

* Set title synchronously on main thread

* Set visibility and focus synchronously on main thread

* Set window level synchronously on main thread

* Set position and size synchronously on main thread

* Set cursor hittest synchronously on main thread

* Add changelog entry
This commit is contained in:
Mads Marquart 2022-11-30 14:30:32 +01:00 committed by GitHub
parent 2a58b785fe
commit bf92f3e97b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 54 additions and 63 deletions

View file

@ -57,7 +57,7 @@ pub(crate) struct Window {
impl Drop for Window {
fn drop(&mut self) {
// Ensure the window is closed
util::close_async(Id::into_super(self.window.clone()));
util::close_sync(&self.window);
}
}