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

Unified Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 2542533002: Don't check autohide taskbar for WS_EX_TOPMOST when we are querying the autohide state. (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/chrome_views_delegate.cc
diff --git a/chrome/browser/ui/views/chrome_views_delegate.cc b/chrome/browser/ui/views/chrome_views_delegate.cc
index 3d66274647c07cd4dde40679454665a7c93361e0..a01d647e3c5bd7e8ad60d0d6da464a47f80b5a7c 100644
--- a/chrome/browser/ui/views/chrome_views_delegate.cc
+++ b/chrome/browser/ui/views/chrome_views_delegate.cc
@@ -99,14 +99,14 @@ PrefService* GetPrefsForWindow(const views::Widget* window) {
}
#if defined(OS_WIN)
-bool MonitorHasTopmostAutohideTaskbarForEdge(UINT edge, HMONITOR monitor) {
+bool MonitorHasAutohideTaskbarForEdge(UINT edge, HMONITOR monitor) {
APPBARDATA taskbar_data = { sizeof(APPBARDATA), NULL, 0, edge };
taskbar_data.hWnd = ::GetForegroundWindow();
// TODO(robliao): Remove ScopedTracker below once crbug.com/462368 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "462368 MonitorHasTopmostAutohideTaskbarForEdge"));
+ "462368 MonitorHasAutohideTaskbarForEdge"));
// MSDN documents an ABM_GETAUTOHIDEBAREX, which supposedly takes a monitor
// rect and returns autohide bars on that monitor. This sounds like a good
@@ -139,8 +139,7 @@ bool MonitorHasTopmostAutohideTaskbarForEdge(UINT edge, HMONITOR monitor) {
taskbar = taskbar_data.hWnd;
}
- if (::IsWindow(taskbar) &&
- (GetWindowLong(taskbar, GWL_EXSTYLE) & WS_EX_TOPMOST)) {
ananta 2016/11/30 02:16:18 Found this patch from 2+ years ago which had this
Peter Kasting 2016/11/30 07:30:30 You didn't link to the patch, but I tracked this d
ananta 2016/11/30 20:37:47 I found this link on msdn https://msdn.microsoft.c
+ if (::IsWindow(taskbar)) {
if (MonitorFromWindow(taskbar, MONITOR_DEFAULTTONEAREST) == monitor)
return true;
// In some cases like when the autohide taskbar is on the left of the
@@ -159,13 +158,13 @@ int GetAppbarAutohideEdgesOnWorkerThread(HMONITOR monitor) {
DCHECK(monitor);
int edges = 0;
- if (MonitorHasTopmostAutohideTaskbarForEdge(ABE_LEFT, monitor))
+ if (MonitorHasAutohideTaskbarForEdge(ABE_LEFT, monitor))
edges |= views::ViewsDelegate::EDGE_LEFT;
- if (MonitorHasTopmostAutohideTaskbarForEdge(ABE_TOP, monitor))
+ if (MonitorHasAutohideTaskbarForEdge(ABE_TOP, monitor))
edges |= views::ViewsDelegate::EDGE_TOP;
- if (MonitorHasTopmostAutohideTaskbarForEdge(ABE_RIGHT, monitor))
+ if (MonitorHasAutohideTaskbarForEdge(ABE_RIGHT, monitor))
edges |= views::ViewsDelegate::EDGE_RIGHT;
- if (MonitorHasTopmostAutohideTaskbarForEdge(ABE_BOTTOM, monitor))
+ if (MonitorHasAutohideTaskbarForEdge(ABE_BOTTOM, monitor))
edges |= views::ViewsDelegate::EDGE_BOTTOM;
return edges;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698