From d1fc4417aff515d03910a9dfbc2217e3e3a1095d Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 17 Aug 2023 18:27:56 +0000 Subject: [PATCH] fix: use tiled edges to calculate frame inset sizes in Linux Adapt to the window frame size calculation changes in CL 3970920 by setting the inset sizes to 0 for tiled edges. Co-authored-by: Athul Iddya --- shell/browser/ui/views/client_frame_view_linux.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/shell/browser/ui/views/client_frame_view_linux.cc b/shell/browser/ui/views/client_frame_view_linux.cc index 9a52533a5af26..04a41383e5922 100644 --- a/shell/browser/ui/views/client_frame_view_linux.cc +++ b/shell/browser/ui/views/client_frame_view_linux.cc @@ -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 {