Add support for simple (pre-Lion) fullscreen on Mac OS

This commit is contained in:
Zachary Flower 2017-08-13 00:28:33 -06:00
parent c6289ef219
commit ba5fa2c8b1
9 changed files with 133 additions and 1 deletions

View file

@ -76,6 +76,8 @@ class NativeWindowMac : public NativeWindow,
std::string GetTitle() override;
void FlashFrame(bool flash) override;
void SetSkipTaskbar(bool skip) override;
void SetSimpleFullScreen(bool simple_fullscreen) override;
bool IsSimpleFullScreen() override;
void SetKiosk(bool kiosk) override;
bool IsKiosk() override;
void SetBackgroundColor(const std::string& color_name) override;
@ -135,6 +137,8 @@ class NativeWindowMac : public NativeWindow,
bool fullscreen_window_title() const { return fullscreen_window_title_; }
bool simple_fullscreen() const { return simple_fullscreen_; }
protected:
// Return a vector of non-draggable regions that fill a window of size
// |width| by |height|, but leave gaps where the window should be draggable.
@ -189,6 +193,19 @@ class NativeWindowMac : public NativeWindow,
// The "titleBarStyle" option.
TitleBarStyle title_bar_style_;
// Simple (pre-Lion) Fullscreen Settings
bool simple_fullscreen_;
bool is_simple_fullscreen_;
bool was_maximized_;
bool was_minimizable_;
bool was_maximizable_;
bool was_resizable_;
bool was_movable_;
NSRect original_frame_;
// The presentation options before entering simple fullscreen mode.
NSApplicationPresentationOptions simple_fullscreen_options_;
DISALLOW_COPY_AND_ASSIGN(NativeWindowMac);
};