Skip to content

Commit

Permalink
fix: wayland window top bar buttons unclickable
Browse files Browse the repository at this point in the history
Use NonClientFrameView::TargetForRect for the ClientFrameViewLinux
implementation because the default inherited from FramelessView blocks
any non-HTCLIENT events.
  • Loading branch information
msizanoen1 committed Jul 23, 2022
1 parent 3a049a4 commit 3d7b7fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions shell/browser/ui/views/client_frame_view_linux.cc
Expand Up @@ -485,4 +485,9 @@ gfx::Size ClientFrameViewLinux::SizeWithDecorations(gfx::Size size) const {
return size;
}

views::View* ClientFrameViewLinux::TargetForRect(views::View* root,
const gfx::Rect& rect) {
return views::NonClientFrameView::TargetForRect(root, rect);
}

} // namespace electron
3 changes: 3 additions & 0 deletions shell/browser/ui/views/client_frame_view_linux.h
Expand Up @@ -67,6 +67,9 @@ class ClientFrameViewLinux : public FramelessView,
void OnPaint(gfx::Canvas* canvas) override;
const char* GetClassName() const override;

// Overriden from views::ViewTargeterDelegate
views::View* TargetForRect(views::View* root, const gfx::Rect& rect) override;

private:
static constexpr int kNavButtonCount = 4;

Expand Down

0 comments on commit 3d7b7fd

Please sign in to comment.