feat: make trafficLightPosition work for customButtonOnHover (#26789)

This commit is contained in:
Cheng Zhao 2020-12-16 14:30:39 +09:00 committed by GitHub
parent 1e2a2004e9
commit e01b1831d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 76 additions and 45 deletions

View file

@ -159,8 +159,8 @@ class NativeWindowMac : public NativeWindow, public ui::NativeThemeObserver {
// Custom traffic light positioning
void RedrawTrafficLights() override;
void SetExitingFullScreen(bool flag);
void SetTrafficLightPosition(const gfx::Point& position) override;
gfx::Point GetTrafficLightPosition() const override;
void SetTrafficLightPosition(base::Optional<gfx::Point> position) override;
base::Optional<gfx::Point> GetTrafficLightPosition() const override;
void OnNativeThemeUpdated(ui::NativeTheme* observed_theme) override;
enum class VisualEffectState {
@ -220,7 +220,7 @@ class NativeWindowMac : public NativeWindow, public ui::NativeThemeObserver {
bool fullscreen_window_title_ = false;
bool resizable_ = true;
bool exiting_fullscreen_ = false;
gfx::Point traffic_light_position_;
base::Optional<gfx::Point> traffic_light_position_;
NSInteger attention_request_id_ = 0; // identifier from requestUserAttention