Merge pull request #6434 from electron/fullscreen-set-bounds

mac: Do not change window size when in fullscreen
This commit is contained in:
Cheng Zhao 2016-07-11 17:11:51 +09:00 committed by GitHub
commit 5abe726678

View file

@ -737,6 +737,10 @@ bool NativeWindowMac::IsFullscreen() const {
}
void NativeWindowMac::SetBounds(const gfx::Rect& bounds, bool animate) {
// Do nothing if in fullscreen mode.
if (IsFullscreen())
return;
// Check size constraints since setFrame does not check it.
gfx::Size size = bounds.size();
size.SetToMax(GetMinimumSize());