Chromium Code Reviews| 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 |