chromium/chromium-95-xfce-maximize.patch
Tom spot Callaway 9de3cc7e1f 95.0.4638.69
2021-11-15 14:34:13 -05:00

31 lines
1.1 KiB
Diff

From 603d765ca5154db27718d89a2ee9be2a95a64254 Mon Sep 17 00:00:00 2001
From: Alexander Dunaev <adunaev@igalia.com>
Date: Fri, 29 Oct 2021 20:54:46 +0700
Subject: [PATCH] [linux/xfce] Set zero insets on maximising the window.
It turned out that Xfwm handles the frame insets not the way KWin and
Mutter do.
Bug: 1260821
Change-Id: I69e71049157c03b74d78bc5edb7a60bf39cdda8b
---
diff --git a/ui/platform_window/x11/x11_window.cc b/ui/platform_window/x11/x11_window.cc
index dd381747..706f19c 100644
--- a/ui/platform_window/x11/x11_window.cc
+++ b/ui/platform_window/x11/x11_window.cc
@@ -676,6 +676,13 @@
// save this one for later too.
should_maximize_after_map_ = !window_mapped_in_client_;
+ // Some WMs keep respecting the frame extents even if the window is maximised.
+ // Remove the insets when maximising. The extents will be set again when the
+ // window is restored to normal state.
+ // See https://crbug.com/1260821
+ if (CanSetDecorationInsets())
+ SetDecorationInsets(nullptr);
+
SetWMSpecState(true, x11::GetAtom("_NET_WM_STATE_MAXIMIZED_VERT"),
x11::GetAtom("_NET_WM_STATE_MAXIMIZED_HORZ"));
}