[gtk/gtk-3-24: 1/2] Adwaita: Ensure SSD decorations do not change size when losing focus
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 1/2] Adwaita: Ensure SSD decorations do not change size when losing focus
- Date: Fri, 5 Mar 2021 15:47:09 +0000 (UTC)
commit 392e52187dde06917389274b8ca028c989cac7ce
Author: Sebastian Keller <skeller gnome org>
Date: Fri Mar 5 00:36:15 2021 +0100
Adwaita: Ensure SSD decorations do not change size when losing focus
56f6ac5f introduced a 20px shadow for the '.tiled decoration:backdrop'
selector. This selector is more specific than the '.ssd decoration'
selector and caused unfocused tiled SSD windows to have a shadow that
focused ones did not have. The mutter code however assumes that the size
of the decoration does not change between the states and this was
causing a crash when clicking below the titlebar in unfocused tiled SSD
windows.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3716
gtk/theme/Adwaita/_common.scss | 4 +++-
gtk/theme/Adwaita/gtk-contained-dark.css | 2 ++
gtk/theme/Adwaita/gtk-contained.css | 2 ++
gtk/theme/HighContrast/gtk-contained-inverse.css | 2 ++
gtk/theme/HighContrast/gtk-contained.css | 2 ++
5 files changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index b2eb2fc47d..97b253d213 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -4598,7 +4598,9 @@ decoration {
.popup & { box-shadow: none; }
// server-side decorations as used by mutter
- .ssd & { box-shadow: 0 0 0 1px $_wm_border; } //just doing borders, wm draws actual shadows
+ // just doing borders, wm draws actual shadows
+ .ssd & { box-shadow: 0 0 0 1px $_wm_border; }
+ .ssd &:backdrop { box-shadow: 0 0 0 1px $_wm_border_backdrop; }
.csd.popup & {
border-radius: $menu_radius;
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 1951f82619..4b07a0da06 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -1848,6 +1848,8 @@ decoration:backdrop { box-shadow: 0 3px 9px 1px transparent, 0 2px 6px 2px rgba(
.ssd decoration { box-shadow: 0 0 0 1px rgba(27, 27, 27, 0.9); }
+.ssd decoration:backdrop { box-shadow: 0 0 0 1px rgba(27, 27, 27, 0.9); }
+
.csd.popup decoration { border-radius: 5px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(27, 27,
27, 0.8); }
tooltip.csd decoration { border-radius: 5px; box-shadow: none; }
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 34ed56397a..729b1fc8f0 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -1864,6 +1864,8 @@ decoration:backdrop { box-shadow: 0 3px 9px 1px transparent, 0 2px 6px 2px rgba(
.ssd decoration { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.23); }
+.ssd decoration:backdrop { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18); }
+
.csd.popup decoration { border-radius: 5px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0,
0, 0.13); }
tooltip.csd decoration { border-radius: 5px; box-shadow: none; }
diff --git a/gtk/theme/HighContrast/gtk-contained-inverse.css
b/gtk/theme/HighContrast/gtk-contained-inverse.css
index bf27138929..c74a3df6bc 100644
--- a/gtk/theme/HighContrast/gtk-contained-inverse.css
+++ b/gtk/theme/HighContrast/gtk-contained-inverse.css
@@ -1928,6 +1928,8 @@ decoration:backdrop { box-shadow: 0 3px 9px 1px transparent, 0 2px 6px 2px rgba(
.ssd decoration { box-shadow: 0 0 0 1px rgba(104, 104, 104, 0.9); }
+.ssd decoration:backdrop { box-shadow: 0 0 0 1px rgba(104, 104, 104, 0.9); }
+
.csd.popup decoration { border-radius: 5px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(104,
104, 104, 0.8); }
tooltip.csd decoration { border-radius: 5px; box-shadow: none; }
diff --git a/gtk/theme/HighContrast/gtk-contained.css b/gtk/theme/HighContrast/gtk-contained.css
index 8592ee8d41..e0c37f5a23 100644
--- a/gtk/theme/HighContrast/gtk-contained.css
+++ b/gtk/theme/HighContrast/gtk-contained.css
@@ -1944,6 +1944,8 @@ decoration:backdrop { box-shadow: 0 3px 9px 1px transparent, 0 2px 6px 2px rgba(
.ssd decoration { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.23); }
+.ssd decoration:backdrop { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18); }
+
.csd.popup decoration { border-radius: 5px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0,
0, 0.13); }
tooltip.csd decoration { border-radius: 5px; box-shadow: none; }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]