We hook onMaximized so that if the user maximizes the window, it automatically...

We hook onMaximized so that if the user maximizes the window, it automatically full-screens. This allows us to get the same behaviour if the user double-clicks the title bar or uses some other OS shortcut to maximize the window as we get if they clicks the maximize button. However, it's not a particularly clean transition to full-screen mode, especially on Mac, and I suspect it's the root cause of the referenced bug (though I can't repro it). This CL simplifies the common case of maximizing via the window control, which gives a much smoother UX.

BUG=384678

Review URL: https://codereview.chromium.org/338373004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278199 0039d316-1c4b-4281-b951-d872f2087c98
parent de26280d
......@@ -131,6 +131,8 @@ remoting.WindowFrame.prototype.maximizeOrRestoreWindow_ = function() {
// being maximized, then the second restore has no effect.
chrome.app.window.current().restore();
chrome.app.window.current().restore();
} else if (this.isConnected_) {
chrome.app.window.current().fullscreen();
} else {
chrome.app.window.current().maximize();
}
......@@ -172,4 +174,4 @@ remoting.WindowFrame.prototype.updateMaximizeOrRestoreIconTitle_ = function() {
};
/** @type {remoting.WindowFrame} */
remoting.windowFrame = null;
\ No newline at end of file
remoting.windowFrame = null;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment