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

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..9c3d2fb1dd5b8fa960839fae2f73ac53f17f18ef 100644
--- a/ui/views/win/fullscreen_handler.cc
+++ b/ui/views/win/fullscreen_handler.cc
@@ -85,6 +85,20 @@ void FullscreenHandler::SetFullscreenImpl(bool fullscreen) {
new_rect.height(),
SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
}
+
+ if (!task_bar_list_) {
+ HRESULT hr = ::CoCreateInstance(CLSID_TaskbarList, NULL,
+ CLSCTX_INPROC_SERVER,
+ IID_PPV_ARGS(&task_bar_list_));
+ CHECK(SUCCEEDED(hr));
+ }
+
+ // 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
+ // 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