Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 767eda5

Browse files
committed
[Mac] Hide toolbar for frameless window.
1 parent 55cdd42 commit 767eda5

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/browser/native_window_mac.mm

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ - (void)setMouseDownCanMoveWindow:(BOOL)can_move;
5151
NSWindowCollectionBehaviorFullScreenAuxiliary = 1 << 8
5252
};
5353

54+
enum {
55+
NSWindowDocumentVersionsButton = 6,
56+
NSWindowFullScreenButton
57+
};
58+
5459
@interface NSWindow (LionSDKDeclarations)
5560
- (void)toggleFullScreen:(id)sender;
5661
@end
@@ -256,6 +261,7 @@ - (void)showDevTools:(id)sender {
256261
[[window() standardWindowButton:NSWindowZoomButton] setHidden:YES];
257262
[[window() standardWindowButton:NSWindowMiniaturizeButton] setHidden:YES];
258263
[[window() standardWindowButton:NSWindowCloseButton] setHidden:YES];
264+
[[window() standardWindowButton:NSWindowFullScreenButton] setHidden:YES];
259265

260266
InstallDraggableRegionViews();
261267
}
@@ -428,6 +434,9 @@ - (void)showDevTools:(id)sender {
428434
}
429435

430436
void NativeWindowCocoa::AddToolbar() {
437+
if (!has_frame_)
438+
return;
439+
431440
// create the toolbar object
432441
scoped_nsobject<NSToolbar> toolbar(
433442
[[NSToolbar alloc] initWithIdentifier:@"node-webkit toolbar"]);

0 commit comments

Comments
 (0)