electron/shell/browser/ui/cocoa/electron_ns_panel.mm
Josh Soref ea4278754c
chore: fix spelling errors in multiple files (#34574)
* chore: fix spelling in .circleci

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in BUILD.gn

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in appveyor.yml

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in build

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in docs

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in lib

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in script

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in shell

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in spec

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in spec-main

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-06-16 16:46:11 +09:00

39 lines
1.1 KiB
Text

// Copyright (c) 2022 Microsoft, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "shell/browser/ui/cocoa/electron_ns_panel.h"
@implementation ElectronNSPanel
@synthesize originalStyleMask;
- (id)initWithShell:(electron::NativeWindowMac*)shell
styleMask:(NSUInteger)styleMask {
if (self = [super initWithShell:shell styleMask:styleMask]) {
originalStyleMask = styleMask;
}
return self;
}
@dynamic styleMask;
// The Nonactivating mask is reserved for NSPanel,
// but we can use this workaround to add it at runtime
- (NSWindowStyleMask)styleMask {
return originalStyleMask | NSWindowStyleMaskNonactivatingPanel;
}
- (void)setStyleMask:(NSWindowStyleMask)styleMask {
originalStyleMask = styleMask;
// Notify change of style mask.
[super setStyleMask:styleMask];
}
- (void)setCollectionBehavior:(NSWindowCollectionBehavior)collectionBehavior {
NSWindowCollectionBehavior panelBehavior =
(NSWindowCollectionBehaviorCanJoinAllSpaces |
NSWindowCollectionBehaviorFullScreenAuxiliary);
[super setCollectionBehavior:collectionBehavior | panelBehavior];
}
@end