mirror of
https://abf.rosa.ru/djam/chromium-browser-stable-slava86.git
synced 2025-02-24 07:52:54 +00:00

Previous revert of an upstream commit had 2 problems: 1) https://bugs.chromium.org/p/chromium/issues/detail?id=1260821#c77 2) window was oversized with system titlebar enabled
53 lines
2.1 KiB
Diff
53 lines
2.1 KiB
Diff
From 245e71ae8de3f4b5f3478739be819981bb12dfab Mon Sep 17 00:00:00 2001
|
|
From: Alexander Dunaev <adunaev@igalia.com>
|
|
Date: Sat, 13 Nov 2021 06:35:35 +0000
|
|
Subject: [PATCH] [linux/xfce] Introduced a hack for Xfwm.
|
|
|
|
This proposes an alternative to [1]. Either this patch or that one
|
|
should be landed, but not both. See the linked crbug for the details.
|
|
|
|
Setting the frame extents via the _GTK_FRAME_EXTENTS property turned out
|
|
to be problematic at Xfwm. While the issue is agreed to be a bug in the
|
|
window manager, for now we disable setting the frame extents on that WM.
|
|
|
|
This patch introduces a logic that disables setting the window property
|
|
on Xfwm.
|
|
|
|
[1] https://chromium-review.googlesource.com/c/chromium/src/+/3275653
|
|
|
|
Bug: 1260821
|
|
Change-Id: I4b734ac0dc2b97d7ed6b1842564a33ec6e4b4035
|
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3275272
|
|
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
|
|
Commit-Queue: Alexander Dunaev <adunaev@igalia.com>
|
|
Cr-Commit-Position: refs/heads/main@{#941444}
|
|
---
|
|
ui/platform_window/x11/x11_window.cc | 15 +++++++++++++++
|
|
1 file changed, 15 insertions(+)
|
|
|
|
diff --git a/ui/platform_window/x11/x11_window.cc b/ui/platform_window/x11/x11_window.cc
|
|
index 2b2083553c59c..4fa2992394329 100644
|
|
--- a/ui/platform_window/x11/x11_window.cc
|
|
+++ b/ui/platform_window/x11/x11_window.cc
|
|
@@ -1016,6 +1016,21 @@ void X11Window::SetOpacity(float opacity) {
|
|
}
|
|
|
|
bool X11Window::CanSetDecorationInsets() const {
|
|
+ // Xfwm handles _GTK_FRAME_EXTENTS a bit unexpected way. That is a known bug
|
|
+ // that will be eventually fixed, but for now we have to disable the function
|
|
+ // for Xfce. The block below should be removed when Xfwm is updated with the
|
|
+ // fix and is known to work properly.
|
|
+ // See https://crbug.com/1260821.
|
|
+ {
|
|
+ static WindowManagerName wm_name = WM_OTHER;
|
|
+ static bool checked_for_wm = false;
|
|
+ if (!checked_for_wm) {
|
|
+ wm_name = GuessWindowManager();
|
|
+ checked_for_wm = true;
|
|
+ }
|
|
+ if (wm_name == WM_XFWM4)
|
|
+ return false;
|
|
+ }
|
|
return ui::WmSupportsHint(x11::GetAtom("_GTK_FRAME_EXTENTS"));
|
|
}
|
|
|