window: macos set gl layer placement to top-left

This commit is contained in:
Wez Furlong committed 2021-05-08 09:36:19 -07:00
1 parent 89dfeb69d6
commit fb72338689
1 file changed
+11
+11
View File
@@ -187,6 +187,17 @@ impl GlContextPair {
}
};
#[allow(non_upper_case_globals)]
unsafe {
use cocoa::foundation::NSInteger;
const NSViewLayerContentsPlacementTopLeft: NSInteger = 11;
let () = msg_send![
view,
setLayerContentsPlacement: NSViewLayerContentsPlacementTopLeft
];
}
Ok(Self { context, backend })
}
}