feat: enable Windows Control Overlay on Linux (#41769)
This commit is contained in:
parent
1d4b00692d
commit
32e5012017
24 changed files with 1026 additions and 107 deletions
|
@ -26,6 +26,7 @@ class WinFrameView : public FramelessView {
|
|||
~WinFrameView() override;
|
||||
|
||||
void Init(NativeWindowViews* window, views::Widget* frame) override;
|
||||
void InvalidateCaptionButtons() override;
|
||||
|
||||
// Alpha to use for features in the titlebar (the window title and caption
|
||||
// buttons) when the window is inactive. They are opaque when active.
|
||||
|
@ -33,24 +34,17 @@ class WinFrameView : public FramelessView {
|
|||
|
||||
SkColor GetReadableFeatureColor(SkColor background_color);
|
||||
|
||||
// Tells the NonClientView to invalidate the WinFrameView's caption buttons.
|
||||
void InvalidateCaptionButtons();
|
||||
|
||||
// views::NonClientFrameView:
|
||||
gfx::Rect GetWindowBoundsForClientBounds(
|
||||
const gfx::Rect& client_bounds) const override;
|
||||
int NonClientHitTest(const gfx::Point& point) override;
|
||||
|
||||
NativeWindowViews* window() const { return window_; }
|
||||
views::Widget* frame() const { return frame_; }
|
||||
WinCaptionButtonContainer* caption_button_container() {
|
||||
return caption_button_container_;
|
||||
}
|
||||
|
||||
bool IsMaximized() const;
|
||||
|
||||
bool ShouldCustomDrawSystemTitlebar() const;
|
||||
|
||||
// Visual height of the titlebar when the window is maximized (i.e. excluding
|
||||
// the area above the top of the screen).
|
||||
int TitlebarMaximizedVisualHeight() const;
|
||||
|
@ -89,7 +83,7 @@ class WinFrameView : public FramelessView {
|
|||
// The container holding the caption buttons (minimize, maximize, close, etc.)
|
||||
// May be null if the caption button container is destroyed before the frame
|
||||
// view. Always check for validity before using!
|
||||
raw_ptr<WinCaptionButtonContainer> caption_button_container_;
|
||||
raw_ptr<WinCaptionButtonContainer> caption_button_container_ = nullptr;
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue