Revert will-enter-full-screen event, matching osx fullscreen: false behaviour on windows instead

This commit is contained in:
Heilig Benedek 2016-02-22 10:23:56 +01:00
parent 157a290e38
commit 39bb670719
9 changed files with 25 additions and 41 deletions

View file

@ -134,10 +134,16 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
SetAlwaysOnTop(true);
}
#if defined(OS_MACOSX) || defined(OS_WIN)
bool fullscreen;
if (options.Get(options::kFullscreen, &fullscreen) && fullscreen) {
// Disable fullscreen button when 'fullscreenable' is false or 'fullscreen'
// is specified to false.
bool fullscreenable = true;
options.Get(options::kFullScreenable, &fullscreenable);
bool fullscreen = false;
if (options.Get(options::kFullscreen, &fullscreen) && !fullscreen)
fullscreenable = false;
SetFullScreenable(fullscreenable);
if (fullscreen)
SetFullScreen(true);
}
#endif
bool skip;
if (options.Get(options::kSkipTaskbar, &skip) && skip) {
@ -445,13 +451,6 @@ void NativeWindow::NotifyWindowMoved() {
FOR_EACH_OBSERVER(NativeWindowObserver, observers_, OnWindowMoved());
}
bool NativeWindow::RequestEnterFullScreen() {
bool prevent_default = false;
FOR_EACH_OBSERVER(NativeWindowObserver, observers_,
OnWindowWillEnterFullScreen(&prevent_default));
return prevent_default;
}
void NativeWindow::NotifyWindowEnterFullScreen() {
FOR_EACH_OBSERVER(NativeWindowObserver, observers_,
OnWindowEnterFullScreen());