Hide the fullscreen button when leaving fullscreen mode. Fixes #88.

This commit is contained in:
Cheng Zhao 2013-09-11 13:05:08 +08:00
parent 91d54a74e1
commit a567ba08ea
2 changed files with 9 additions and 0 deletions

View file

@ -115,6 +115,8 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
observers_.RemoveObserver(obs); observers_.RemoveObserver(obs);
} }
bool has_frame() const { return has_frame_; }
protected: protected:
explicit NativeWindow(content::WebContents* web_contents, explicit NativeWindow(content::WebContents* web_contents,
base::DictionaryValue* options); base::DictionaryValue* options);

View file

@ -67,6 +67,13 @@
return NO; return NO;
} }
- (void)windowDidExitFullScreen:(NSNotification*)notification {
if (!shell_->has_frame()) {
NSWindow* window = shell_->GetNativeWindow();
[[window standardWindowButton:NSWindowFullScreenButton] setHidden:YES];
}
}
@end @end
@interface AtomNSWindow : AtomEventProcessingWindow { @interface AtomNSWindow : AtomEventProcessingWindow {