Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
Possible fix for issues seen on frameless window (Windows) when at 200%
Browse files Browse the repository at this point in the history
  • Loading branch information
bsclifton authored and bridiver committed Sep 29, 2016
1 parent ecc3237 commit 182fe6d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions atom/browser/native_window_views.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1155,9 +1155,6 @@ void NativeWindowViews::OnWidgetMove() {

gfx::Rect NativeWindowViews::ContentBoundsToWindowBounds(
const gfx::Rect& bounds) {
if (!has_frame())
return bounds;

gfx::Rect window_bounds(bounds);
#if defined(OS_WIN)
HWND hwnd = GetAcceleratedWidget();
Expand All @@ -1167,7 +1164,7 @@ gfx::Rect NativeWindowViews::ContentBoundsToWindowBounds(
window_->non_client_view()->GetWindowBoundsForClientBounds(dpi_bounds));
#endif

if (menu_bar_ && menu_bar_visible_) {
if (has_frame() && menu_bar_ && menu_bar_visible_) {
window_bounds.set_y(window_bounds.y() - kMenuBarHeight);
window_bounds.set_height(window_bounds.height() + kMenuBarHeight);
}
Expand All @@ -1176,9 +1173,6 @@ gfx::Rect NativeWindowViews::ContentBoundsToWindowBounds(

gfx::Rect NativeWindowViews::WindowBoundsToContentBounds(
const gfx::Rect& bounds) {
if (!has_frame())
return bounds;

gfx::Rect content_bounds(bounds);
#if defined(OS_WIN)
HWND hwnd = GetAcceleratedWidget();
Expand All @@ -1195,7 +1189,7 @@ gfx::Rect NativeWindowViews::WindowBoundsToContentBounds(
display::win::ScreenWin::ScreenToDIPSize(hwnd, content_bounds.size()));
#endif

if (menu_bar_ && menu_bar_visible_) {
if (has_frame() && menu_bar_ && menu_bar_visible_) {
content_bounds.set_y(content_bounds.y() + kMenuBarHeight);
content_bounds.set_height(content_bounds.height() - kMenuBarHeight);
}
Expand Down

0 comments on commit 182fe6d

Please sign in to comment.