fix: use tiled edges to calculate frame inset sizes in Linux (#39523)

Adapt to the window frame size calculation changes in CL 3970920 by
setting the inset sizes to 0 for tiled edges.
This commit is contained in:
Athul Iddya 2023-08-17 11:26:49 -07:00 committed by GitHub
parent 0621f39296
commit c75e193a3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {