report correct content size in AtomNSWindow

The views framework relies on NSWindow to return content size of window,
since we don't use the borderless window, the original result would
include titlebar. We have to override the function to return correct
result for frameless window.
This commit is contained in:
Cheng Zhao 2018-05-02 21:28:28 +09:00
parent 28fc58067b
commit 5547df6073
5 changed files with 35 additions and 14 deletions

View file

@ -9,9 +9,12 @@
namespace atom {
class NativeWindowMac;
class AtomNativeWidgetMac : public views::NativeWidgetMac {
public:
AtomNativeWidgetMac(NSUInteger style_mask,
AtomNativeWidgetMac(NativeWindowMac* shell,
NSUInteger style_mask,
views::internal::NativeWidgetDelegate* delegate);
~AtomNativeWidgetMac() override;
@ -21,6 +24,7 @@ class AtomNativeWidgetMac : public views::NativeWidgetMac {
const views::Widget::InitParams& params) override;
private:
NativeWindowMac* shell_;
NSUInteger style_mask_;
DISALLOW_COPY_AND_ASSIGN(AtomNativeWidgetMac);