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

Unified Diff: chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.cc

Issue 1213243002: win10: Fix various ui glitches (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2403
Patch Set: Created 5 years, 6 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 | « no previous file | chrome/browser/ui/views/frame/glass_browser_frame_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.cc
diff --git a/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.cc b/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.cc
index ea2d19d6fe7ab8f06155bcb00fd77c658dc9834d..ac7d9c2bad702f65debcafb896b7940447bf9457 100644
--- a/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.cc
+++ b/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.cc
@@ -7,6 +7,7 @@
#include <dwmapi.h>
#include "base/process/process_handle.h"
+#include "base/win/windows_version.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/themes/theme_service_factory.h"
@@ -330,10 +331,19 @@ MARGINS BrowserDesktopWindowTreeHostWin::GetDWMFrameMargins() const {
// because the GDI-drawn text in the web content composited over it will
// become semi-transparent over any glass area.
if (!IsMaximized() && !GetWidget()->IsFullscreen()) {
- margins.cxLeftWidth = kClientEdgeThickness + 1;
- margins.cxRightWidth = kClientEdgeThickness + 1;
- margins.cyBottomHeight = kClientEdgeThickness + 1;
margins.cyTopHeight = kClientEdgeThickness + 1;
+ // On Windows 10, we don't draw our own window border, so don't extend the
+ // nonclient area in for it. The top is extended so that the MARGINS isn't
+ // treated as an empty (ignored) extension.
+ if (base::win::GetVersion() >= base::win::VERSION_WIN10) {
+ margins.cxLeftWidth = 0;
+ margins.cxRightWidth = 0;
+ margins.cyBottomHeight = 0;
+ } else {
+ margins.cxLeftWidth = kClientEdgeThickness + 1;
+ margins.cxRightWidth = kClientEdgeThickness + 1;
+ margins.cyBottomHeight = kClientEdgeThickness + 1;
+ }
}
// In maximized mode, we only have a titlebar strip of glass, no side/bottom
// borders.
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/glass_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698