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

Fix for rounded border issue on 200% DPI (Windows). #144

Merged
merged 1 commit into from
Jan 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions atom/browser/native_window_views_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,6 @@ bool NativeWindowViews::PreHandleMSG(
}
return false;
}
/** Return zero (no-op) for non-client area events when window is frameless.
* \see WM_NCPAINT - https://msdn.microsoft.com/en-us/library/windows/desktop/dd145212(v=vs.85).aspx
* \see WM_NCCALCSIZE - https://msdn.microsoft.com/en-us/library/windows/desktop/ms632634(v=vs.85).aspx
*/
case WM_NCPAINT:
case WM_NCCALCSIZE: {
if (!has_frame()) {
*result = 0;
return true;
}
return false;
}
default:
return false;
}
Expand Down
8 changes: 8 additions & 0 deletions atom/browser/ui/win/atom_desktop_window_tree_host_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,12 @@ bool AtomDesktopWindowTreeHostWin::PreHandleMSG(
return delegate_->PreHandleMSG(message, w_param, l_param, result);
}

/** Override the client area inset
* Returning true forces a border of 0 for frameless windows
*/
bool AtomDesktopWindowTreeHostWin::GetClientAreaInsets(
gfx::Insets* insets) const {
return !HasFrame();
}

} // namespace atom
1 change: 1 addition & 0 deletions atom/browser/ui/win/atom_desktop_window_tree_host_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class AtomDesktopWindowTreeHostWin : public views::DesktopWindowTreeHostWin {
protected:
bool PreHandleMSG(
UINT message, WPARAM w_param, LPARAM l_param, LRESULT* result) override;
bool GetClientAreaInsets(gfx::Insets* insets) const override;

private:
MessageHandlerDelegate* delegate_; // weak ref
Expand Down