Index: chrome/browser/ui/ash/ash_util.cc |
diff --git a/chrome/browser/ui/ash/ash_util.cc b/chrome/browser/ui/ash/ash_util.cc |
index 488cc4c3f8cef178575b9d5369410285ff35d061..dff6f1f6a06b02f9419c43212e97d3b10abb56e1 100644 |
--- a/chrome/browser/ui/ash/ash_util.cc |
+++ b/chrome/browser/ui/ash/ash_util.cc |
@@ -6,7 +6,9 @@ |
#include "ash/shell.h" |
#include "chrome/browser/ui/ash/ash_init.h" |
+#include "chrome/browser/ui/host_desktop.h" |
#include "ui/aura/root_window.h" |
+#include "ui/gfx/screen.h" |
namespace chrome { |
@@ -36,10 +38,13 @@ bool IsNativeWindowInAsh(gfx::NativeWindow native_window) { |
} |
void ToggleAshDesktop() { |
+ ScopedForceDesktopType force_ash(HOST_DESKTOP_TYPE_ASH); |
+ gfx::Screen::ForceScreenTypeOverride(gfx::SCREEN_TYPE_ALTERNATE); |
if (!ash::Shell::HasInstance()) |
OpenAsh(); |
else |
CloseAsh(); |
+ gfx::Screen::ForceScreenTypeOverride(gfx::SCREEN_TYPE_COUNT); |
} |
} // namespace chrome |