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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « ui/views/win/fullscreen_handler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/win/fullscreen_handler.h" 5 #include "ui/views/win/fullscreen_handler.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/win/win_util.h" 10 #include "base/win/win_util.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // repainted. Better-looking methods welcome. 78 // repainted. Better-looking methods welcome.
79 SetWindowLong(hwnd_, GWL_STYLE, saved_window_info_.style); 79 SetWindowLong(hwnd_, GWL_STYLE, saved_window_info_.style);
80 SetWindowLong(hwnd_, GWL_EXSTYLE, saved_window_info_.ex_style); 80 SetWindowLong(hwnd_, GWL_EXSTYLE, saved_window_info_.ex_style);
81 81
82 // On restore, resize to the previous saved rect size. 82 // On restore, resize to the previous saved rect size.
83 gfx::Rect new_rect(saved_window_info_.window_rect); 83 gfx::Rect new_rect(saved_window_info_.window_rect);
84 SetWindowPos(hwnd_, NULL, new_rect.x(), new_rect.y(), new_rect.width(), 84 SetWindowPos(hwnd_, NULL, new_rect.x(), new_rect.y(), new_rect.width(),
85 new_rect.height(), 85 new_rect.height(),
86 SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED); 86 SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
87 } 87 }
88
89 if (!task_bar_list_) {
90 HRESULT hr = ::CoCreateInstance(CLSID_TaskbarList, NULL,
91 CLSCTX_INPROC_SERVER,
92 IID_PPV_ARGS(&task_bar_list_));
93 CHECK(SUCCEEDED(hr));
94 }
95
96 // As per MSDN marking the window as fullscreen should ensure that the
97 // taskbar is moved to the bottom of the Z-order when the fullscreen window
98 // is activated. If the window is not fullscreen, the Shell falls back to
99 // heuristics to determine how the window should be treated, which means
100 // that it could still consider the window as fullscreen. :(
101 task_bar_list_->MarkFullscreenWindow(hwnd_, !!fullscreen);
88 } 102 }
89 103
90 } // namespace views 104 } // namespace views
OLDNEW
« 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