Skip to content

Commit

Permalink
fix: use tiled edges to calculate frame inset sizes in Linux (#39567)
Browse files Browse the repository at this point in the history
Adapt to the window frame size calculation changes in CL 3970920 by
setting the inset sizes to 0 for tiled edges.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Athul Iddya <athul@iddya.com>
  • Loading branch information
trop[bot] and aiddya committed Aug 21, 2023
1 parent 63883ad commit cec0e9c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion shell/browser/ui/views/client_frame_view_linux.cc
Expand Up @@ -150,7 +150,13 @@ void ClientFrameViewLinux::Init(NativeWindowViews* window,
}

gfx::Insets ClientFrameViewLinux::GetBorderDecorationInsets() const {
return frame_provider_->GetFrameThicknessDip();
const auto insets = frame_provider_->GetFrameThicknessDip();
// We shouldn't draw frame decorations for the tiled edges.
// See https://wayland.app/protocols/xdg-shell#xdg_toplevel:enum:state
return gfx::Insets::TLBR(tiled_edges().top ? 0 : insets.top(),
tiled_edges().left ? 0 : insets.left(),
tiled_edges().bottom ? 0 : insets.bottom(),
tiled_edges().right ? 0 : insets.right());
}

gfx::Insets ClientFrameViewLinux::GetInputInsets() const {
Expand Down

0 comments on commit cec0e9c

Please sign in to comment.