Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Merge branch 'main' into fix-notification-positioning

Conrad Irwincb8404340091
diff --cc crates/gpui/src/platform/mac/window.rs
index e1277e3a09e,ee7411bc4f8..814b8cc788c
--- a/crates/gpui/src/platform/mac/window.rs
+++ b/crates/gpui/src/platform/mac/window.rs
@@@ -654,6 -637,27 +635,27 @@@ impl MacWindow
native_window.orderFront_(nil);
}
+ let screen = native_window.screen();
+ match options.bounds {
+ WindowBounds::Fullscreen => {
+ // We need to toggle full screen asynchronously as doing so may
+ // call back into the platform handlers.
+ window.toggle_full_screen()
+ }
+ WindowBounds::Maximized => {
+ native_window.setFrame_display_(screen.visibleFrame(), YES);
+ }
+ WindowBounds::Fixed(bounds) => {
+ let display_bounds = display.bounds();
+ let frame = if bounds.intersects(&display_bounds) {
- display_bounds_to_native(bounds)
++ global_bounds_to_ns_rect(bounds)
+ } else {
- display_bounds_to_native(display_bounds)
++ global_bounds_to_ns_rect(display_bounds)
+ };
- native_window.setFrame_display_(mem::transmute::<CGRect, NSRect>(frame), YES);
++ native_window.setFrame_display_(frame, YES);
+ }
+ }
+
window.0.lock().move_traffic_light();
pool.drain();