diff options
author | jbauman <jbauman@chromium.org> | 2016-03-18 04:05:14 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-18 11:07:20 +0000 |
commit | 70bdd0c31e09231f9690185313fb0ba2df3dc12a (patch) | |
tree | 241d190d1916b853790d897c29702b40cbb08c7b | |
parent | b0a316459b6513356a05f1198daeceed6d196494 (diff) | |
download | chromium_src-70bdd0c31e09231f9690185313fb0ba2df3dc12a.zip chromium_src-70bdd0c31e09231f9690185313fb0ba2df3dc12a.tar.gz chromium_src-70bdd0c31e09231f9690185313fb0ba2df3dc12a.tar.bz2 |
Avoid temporarily hiding window when fullscreening on Aero.
This was causing the window to disappear and windows behind it to flash through for a few frames.
BUG=427189
Review URL: https://codereview.chromium.org/1766853002
Cr-Commit-Position: refs/heads/master@{#381933}
-rw-r--r-- | ui/views/win/fullscreen_handler.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ui/views/win/fullscreen_handler.cc b/ui/views/win/fullscreen_handler.cc index a40cfc5..0529f6e 100644 --- a/ui/views/win/fullscreen_handler.cc +++ b/ui/views/win/fullscreen_handler.cc @@ -5,7 +5,9 @@ #include "ui/views/win/fullscreen_handler.h" #include "base/logging.h" +#include "base/memory/scoped_ptr.h" #include "base/win/win_util.h" +#include "ui/base/win/shell.h" #include "ui/gfx/geometry/rect.h" #include "ui/views/win/scoped_fullscreen_visibility.h" @@ -34,7 +36,13 @@ gfx::Rect FullscreenHandler::GetRestoreBounds() const { // FullscreenHandler, private: void FullscreenHandler::SetFullscreenImpl(bool fullscreen) { - ScopedFullscreenVisibility visibility(hwnd_); + scoped_ptr<ScopedFullscreenVisibility> visibility; + + // With Aero enabled disabling the visibility causes the window to disappear + // for several frames, which looks worse than doing other updates + // non-atomically. + if (!ui::win::IsAeroGlassEnabled()) + visibility.reset(new ScopedFullscreenVisibility(hwnd_)); // Save current window state if not already fullscreen. if (!fullscreen_) { |