Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: ui/views/win/fullscreen_handler.cc

Issue 2972963004: Another attempt at fixing the fullscreen issues with Chrome. (Closed)
Patch Set: Address review comments Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/win/fullscreen_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/win/fullscreen_handler.cc
diff --git a/ui/views/win/fullscreen_handler.cc b/ui/views/win/fullscreen_handler.cc
index 89581d79d06dbae1ebe657ede9aca043725cba7f..d6013f765b987bc6ee2627ebc62511bea9f32770 100644
--- a/ui/views/win/fullscreen_handler.cc
+++ b/ui/views/win/fullscreen_handler.cc
@@ -39,6 +39,13 @@ gfx::Rect FullscreenHandler::GetRestoreBounds() const {
void FullscreenHandler::SetFullscreenImpl(bool fullscreen) {
std::unique_ptr<ScopedFullscreenVisibility> visibility;
+ if (!task_bar_list_) {
msw 2017/07/06 19:33:52 optional nit: move this down to just above the tas
ananta 2017/07/06 20:03:17 Done.
+ HRESULT hr = ::CoCreateInstance(CLSID_TaskbarList, NULL,
+ CLSCTX_INPROC_SERVER,
+ IID_PPV_ARGS(&task_bar_list_));
+ CHECK(SUCCEEDED(hr));
+ }
+
// With Aero enabled disabling the visibility causes the window to disappear
// for several frames, which looks worse than doing other updates
// non-atomically.
@@ -85,6 +92,13 @@ void FullscreenHandler::SetFullscreenImpl(bool fullscreen) {
new_rect.height(),
SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
}
+
+ // As per MSDN marking the window as fullscreen should ensure that the
+ // taskbar is moved to the bottom of the Z- order when the fullscreen window
msw 2017/07/06 19:33:52 nit: no space after hyphen ('Z-order')
ananta 2017/07/06 20:03:17 Thanks done.
+ // is activated. If the window is not fullscreen, the Shell falls back to
+ // heuristics to determine how the window should be treated, which means
+ // that it could still consider the window as fullscreen. :(
+ task_bar_list_->MarkFullscreenWindow(hwnd_, !!fullscreen);
}
} // namespace views
« no previous file with comments | « ui/views/win/fullscreen_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698