mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Fix the rendering for the rounded edges
This commit is contained in:
@@ -147,18 +147,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;
|
||||
}
|
||||
|
||||
@@ -25,4 +25,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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user