From 461fe36707a346957e4efac56ca504a23bfa2006 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Wed, 3 Feb 2021 16:15:02 -0800 Subject: [PATCH 1/2] adwaita: disable shadows when window is maximized or fullscreen These shadows cause a significant draw performance drop for maximized windows. Disabling them increases the chances we can have faster scroll performance of text. There is some risk here for systems where they have a dock and you expect the shadow to draw beneath that dock for transparency reasons. --- gtk/theme/Adwaita/_common.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index 5588e4fb40..e7c33f8d19 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -4100,6 +4100,9 @@ window { &:backdrop { box-shadow: inset 0 0 0 3px $backdrop_bg_color, inset 0 1px $top_hilight; } } + + &.maximized, + &.fullscreen { box-shadow: none; } } &.maximized, From da64856f3701db49951cc96105db456480decc15 Mon Sep 17 00:00:00 2001 From: Jakub Steiner Date: Tue, 9 Feb 2021 18:57:31 +0100 Subject: [PATCH 2/2] Adwaita: don't cast shadows for halt-tiled windows - while the case of a single half tiled window casting shadow is valid, the main use case for half tiled windows is when they have a neighbor. The :backdrop should be enough of a focus indicator and we avoid shadow casting on neighbors that are on the same Z level. --- gtk/theme/Adwaita/_common.scss | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index e7c33f8d19..03bd00f154 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -4100,9 +4100,6 @@ window { &:backdrop { box-shadow: inset 0 0 0 3px $backdrop_bg_color, inset 0 1px $top_hilight; } } - - &.maximized, - &.fullscreen { box-shadow: none; } } &.maximized, @@ -4111,7 +4108,7 @@ window { &.tiled-top, &.tiled-left, &.tiled-right, - &.tiled-bottom { border-radius: 0; } + &.tiled-bottom { border-radius: 0; box-shadow: none; } &.popup { box-shadow: none; }