From 6ae38327cae05da15cf7c442b12cc1cc94b5e84a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Thu, 13 May 2021 21:13:18 +0200 Subject: [PATCH] Leave CSS fullscreen optimization applied Do not apply and remove fullscreen optimization class when going/leaving fullscreen. Instead set it to be applied to fullscreen only with CSS. --- css/styles.css | 2 +- src/appBase.js | 2 ++ src/widget.js | 4 ---- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/css/styles.css b/css/styles.css index 86666971..92fd33c4 100644 --- a/css/styles.css +++ b/css/styles.css @@ -314,7 +314,7 @@ radio { .gpufriendly { box-shadow: -8px -8px transparent, 8px 8px transparent; } -.gpufriendlyfs { +.fullscreen.gpufriendlyfs { box-shadow: none; } diff --git a/src/appBase.js b/src/appBase.js index 52fef493..0a8eeee1 100644 --- a/src/appBase.js +++ b/src/appBase.js @@ -34,6 +34,8 @@ class ClapperAppBase extends Gtk.Application if(!settings.get_boolean('render-shadows')) window.add_css_class('gpufriendly'); + + window.add_css_class('gpufriendlyfs'); } vfunc_activate() diff --git a/src/widget.js b/src/widget.js index 9f328c03..70679a3a 100644 --- a/src/widget.js +++ b/src/widget.js @@ -142,10 +142,6 @@ class ClapperWidget extends Gtk.Grid debug('changing fullscreen mode'); this.isFullscreenMode = isFullscreen; - const root = this.get_root(); - const action = (isFullscreen) ? 'add' : 'remove'; - root[action + '_css_class']('gpufriendlyfs'); - if(!isFullscreen) this._clearTimeout('updateTime');