Commit e444c8ac authored by ben@chromium.org's avatar ben@chromium.org

Grab-bag:

. Avoid trying to layout the desktop when its size is set to 0x0 when minimized on Windows.
. Don't show the "Default Browser" UI in Aura either.
. Don't flash the active window inactive briefly when clicking on launcher items.

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8565015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109966 0039d316-1c4b-4281-b951-d872f2087c98
parent 010882ff
......@@ -6,6 +6,12 @@
namespace browser_defaults {
#if defined(USE_AURA) || defined(OS_CHROMEOS)
const bool kOSSupportsOtherBrowsers = false;
#else
const bool kOSSupportsOtherBrowsers = true;
#endif
#if defined(OS_CHROMEOS)
// Make the regular omnibox text two points larger than the nine-point font
......@@ -21,7 +27,6 @@ const bool kCanToggleSystemTitleBar = false;
const bool kRestorePopups = false;
const bool kShowImportOnBookmarkBar = false;
const bool kShowExitMenuItem = true;
const bool kOSSupportsOtherBrowsers = false;
const bool kDownloadPageHasShowInFolder = true;
const bool kSizeTabButtonToTopOfTabStrip = true;
const bool kBootstrapSyncAuthentication = true;
......@@ -60,7 +65,6 @@ const bool kShowExitMenuItem = false;
#else
const bool kShowExitMenuItem = true;
#endif
const bool kOSSupportsOtherBrowsers = true;
const bool kSizeTabButtonToTopOfTabStrip = false;
const bool kBootstrapSyncAuthentication = false;
const bool kShowOtherBrowsersInAboutMemory = true;
......
......@@ -323,12 +323,14 @@ void Desktop::OnHostResized(const gfx::Size& size) {
}
void Desktop::SetActiveWindow(Window* window, Window* to_focus) {
if (!window)
return;
// The stacking client may impose rules on what window configurations can be
// activated or deactivated.
if (window && !stacking_client_->CanActivateWindow(window))
if (!stacking_client_->CanActivateWindow(window))
return;
// The window may not be activate-able.
if (window && !window->CanActivate())
if (!window->CanActivate())
return;
// Nothing may actually have changed.
if (active_window_ == window)
......
......@@ -96,8 +96,8 @@ class AURA_EXPORT Desktop : public ui::CompositorDelegate,
void OnHostResized(const gfx::Size& size);
// Sets the active window to |window| and the focused window to |to_focus|.
// If |to_focus| is NULL, |window| is focused.
// |window| can be NULL.
// If |to_focus| is NULL, |window| is focused. Does nothing if |window| is
// NULL.
void SetActiveWindow(Window* window, Window* to_focus);
// Activates the topmost window. Does nothing if the topmost window is already
......
......@@ -258,7 +258,10 @@ void DesktopHostWin::OnPaint(HDC dc) {
}
void DesktopHostWin::OnSize(UINT param, const CSize& size) {
desktop_->OnHostResized(gfx::Size(size.cx, size.cy));
// Minimizing resizes the window to 0x0 which causes our layout to go all
// screwy, so we just ignore it.
if (param != SIZE_MINIMIZED)
desktop_->OnHostResized(gfx::Size(size.cx, size.cy));
}
} // namespace aura
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