mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-25 14:51:30 +11:00
Merge pull request #210 from brendanzab/update-macos-dependencies
Update Mac OS dependencies
This commit is contained in:
commit
ee0dbb8546
|
@ -24,9 +24,9 @@ objc = "0.2"
|
||||||
[target.'cfg(target_os = "macos")'.dependencies]
|
[target.'cfg(target_os = "macos")'.dependencies]
|
||||||
objc = "0.2"
|
objc = "0.2"
|
||||||
cgl = "0.2"
|
cgl = "0.2"
|
||||||
cocoa = "=0.5.2"
|
cocoa = "0.9"
|
||||||
core-foundation = "0.2"
|
core-foundation = "0.4"
|
||||||
core-graphics = "0.4"
|
core-graphics = "0.8"
|
||||||
|
|
||||||
[target.'cfg(target_os = "windows")'.dependencies]
|
[target.'cfg(target_os = "windows")'.dependencies]
|
||||||
winapi = "0.2"
|
winapi = "0.2"
|
||||||
|
|
|
@ -66,7 +66,7 @@ extern {
|
||||||
pub fn longjmp(env: *mut libc::c_void, val: libc::c_int);
|
pub fn longjmp(env: *mut libc::c_void, val: libc::c_int);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait NSString {
|
pub trait NSString: Sized {
|
||||||
unsafe fn alloc(_: Self) -> id {
|
unsafe fn alloc(_: Self) -> id {
|
||||||
msg_send![class("NSString"), alloc]
|
msg_send![class("NSString"), alloc]
|
||||||
}
|
}
|
||||||
|
|
|
@ -338,21 +338,17 @@ impl Window {
|
||||||
|
|
||||||
let masks = if screen.is_some() {
|
let masks = if screen.is_some() {
|
||||||
// Fullscreen window
|
// Fullscreen window
|
||||||
appkit::NSBorderlessWindowMask as NSUInteger |
|
appkit::NSBorderlessWindowMask | appkit::NSResizableWindowMask |
|
||||||
appkit::NSResizableWindowMask as NSUInteger |
|
appkit::NSTitledWindowMask
|
||||||
appkit::NSTitledWindowMask as NSUInteger
|
|
||||||
} else if attrs.decorations {
|
} else if attrs.decorations {
|
||||||
// Window with a titlebar
|
// Window with a titlebar
|
||||||
appkit::NSClosableWindowMask as NSUInteger |
|
appkit::NSClosableWindowMask | appkit::NSMiniaturizableWindowMask |
|
||||||
appkit::NSMiniaturizableWindowMask as NSUInteger |
|
appkit::NSResizableWindowMask | appkit::NSTitledWindowMask
|
||||||
appkit::NSResizableWindowMask as NSUInteger |
|
|
||||||
appkit::NSTitledWindowMask as NSUInteger
|
|
||||||
} else {
|
} else {
|
||||||
// Window without a titlebar
|
// Window without a titlebar
|
||||||
appkit::NSClosableWindowMask as NSUInteger |
|
appkit::NSClosableWindowMask | appkit::NSMiniaturizableWindowMask |
|
||||||
appkit::NSMiniaturizableWindowMask as NSUInteger |
|
appkit::NSResizableWindowMask |
|
||||||
appkit::NSResizableWindowMask as NSUInteger |
|
appkit::NSFullSizeContentViewWindowMask
|
||||||
appkit::NSFullSizeContentViewWindowMask as NSUInteger
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let window = IdRef::new(NSWindow::alloc(nil).initWithContentRect_styleMask_backing_defer_(
|
let window = IdRef::new(NSWindow::alloc(nil).initWithContentRect_styleMask_backing_defer_(
|
||||||
|
|
Loading…
Reference in a new issue