Implement ability to make non-activating window on macOS (#4035)
Fixes #3894
This commit is contained in:
parent
5835c9102e
commit
4d5e68c6e2
6 changed files with 86 additions and 37 deletions
|
|
@ -332,6 +332,13 @@ pub trait WindowAttributesExtMacOS {
|
|||
fn with_borderless_game(self, borderless_game: bool) -> Self;
|
||||
/// See [`WindowExtMacOS::set_unified_titlebar`] for details on what this means if set.
|
||||
fn with_unified_titlebar(self, unified_titlebar: bool) -> Self;
|
||||
/// Use [`NSPanel`] window with [`NonactivatingPanel`] window style mask instead of
|
||||
/// [`NSWindow`].
|
||||
///
|
||||
/// [`NSWindow`]: https://developer.apple.com/documentation/appkit/NSWindow?language=objc
|
||||
/// [`NSPanel`]: https://developer.apple.com/documentation/appkit/NSPanel?language=objc
|
||||
/// [`NonactivatingPanel`]: https://developer.apple.com/documentation/appkit/nswindow/stylemask-swift.struct/nonactivatingpanel?language=objc
|
||||
fn with_panel(self, panel: bool) -> Self;
|
||||
}
|
||||
|
||||
impl WindowAttributesExtMacOS for WindowAttributes {
|
||||
|
|
@ -412,6 +419,12 @@ impl WindowAttributesExtMacOS for WindowAttributes {
|
|||
self.platform_specific.unified_titlebar = unified_titlebar;
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn with_panel(mut self, panel: bool) -> Self {
|
||||
self.platform_specific.panel = panel;
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
pub trait EventLoopBuilderExtMacOS {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue