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:
parent
28fc58067b
commit
5547df6073
5 changed files with 35 additions and 14 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue