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

Side by Side Diff: chrome/browser/ui/views/panels/panel_view.cc

Issue 1935083003: gfx::Screen: Replace GetWindowUnderCursor() with IsWindowUnderCursor(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Null checks Created 4 years, 7 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
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 "chrome/browser/ui/views/panels/panel_view.h" 5 #include "chrome/browser/ui/views/panels/panel_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 // clicking on its titlebar. This is the workaround to support restoring the 1005 // clicking on its titlebar. This is the workaround to support restoring the
1006 // minimized panel by other means, like alt-tabbing, win-tabbing, or clicking 1006 // minimized panel by other means, like alt-tabbing, win-tabbing, or clicking
1007 // the taskbar icon. Note that this workaround does not work for one edge 1007 // the taskbar icon. Note that this workaround does not work for one edge
1008 // case: the mouse happens to be at the minimized panel when the user tries to 1008 // case: the mouse happens to be at the minimized panel when the user tries to
1009 // bring up the panel with the above alternatives. 1009 // bring up the panel with the above alternatives.
1010 // When the user clicks on the minimized panel, the panel expansion will be 1010 // When the user clicks on the minimized panel, the panel expansion will be
1011 // done when we process the mouse button pressed message. 1011 // done when we process the mouse button pressed message.
1012 #if defined(OS_WIN) 1012 #if defined(OS_WIN)
1013 if (focused_ && panel_->IsMinimized() && 1013 if (focused_ && panel_->IsMinimized() &&
1014 panel_->collection()->type() == PanelCollection::DOCKED && 1014 panel_->collection()->type() == PanelCollection::DOCKED &&
1015 display::Screen::GetScreen()->GetWindowUnderCursor() != 1015 !display::Screen::GetScreen()->IsWindowUnderCursor(
1016 widget->GetNativeWindow()) { 1016 widget->GetNativeWindow())) {
1017 panel_->Restore(); 1017 panel_->Restore();
1018 } 1018 }
1019 #endif 1019 #endif
1020 1020
1021 panel()->OnActiveStateChanged(focused); 1021 panel()->OnActiveStateChanged(focused);
1022 1022
1023 // Give web contents view a chance to set focus to the appropriate element. 1023 // Give web contents view a chance to set focus to the appropriate element.
1024 if (focused_) { 1024 if (focused_) {
1025 content::WebContents* web_contents = panel_->GetWebContents(); 1025 content::WebContents* web_contents = panel_->GetWebContents();
1026 if (web_contents) 1026 if (web_contents)
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 // SWP_FRAMECHANGED flag must be called in order for the cached window data 1144 // SWP_FRAMECHANGED flag must be called in order for the cached window data
1145 // to be updated properly. 1145 // to be updated properly.
1146 // http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591(v=vs.85).a spx 1146 // http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591(v=vs.85).a spx
1147 if (update_frame) { 1147 if (update_frame) {
1148 ::SetWindowPos(native_window, NULL, 0, 0, 0, 0, 1148 ::SetWindowPos(native_window, NULL, 0, 0, 0, 0,
1149 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | 1149 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE |
1150 SWP_NOZORDER | SWP_NOACTIVATE); 1150 SWP_NOZORDER | SWP_NOACTIVATE);
1151 } 1151 }
1152 } 1152 }
1153 #endif 1153 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698