From 8e48da2a9f2412ad9c421e9ceb8e56eac8e74709 Mon Sep 17 00:00:00 2001 From: Rafostar <40623528+Rafostar@users.noreply.github.com> Date: Thu, 12 Nov 2020 22:51:14 +0100 Subject: [PATCH] Performance: do not render window background and shadows when fullscreen --- clapper_src/widget.js | 4 ++++ css/styles.css | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/clapper_src/widget.js b/clapper_src/widget.js index 694cc213..c35b23e9 100644 --- a/clapper_src/widget.js +++ b/clapper_src/widget.js @@ -99,6 +99,10 @@ var Widget = GObject.registerClass({ this.fullscreenMode = isFullscreen; + let root = this.get_root(); + let action = (isFullscreen) ? 'add' : 'remove'; + root[action + '_css_class']('gpufriendly'); + if(!this.floatingMode) this._changeControlsPlacement(isFullscreen); else { diff --git a/css/styles.css b/css/styles.css index ffd1a9ec..5d312a94 100644 --- a/css/styles.css +++ b/css/styles.css @@ -143,3 +143,9 @@ scale marks { .uridialogbox { margin: 12px; } + +/* Other */ +.gpufriendly { + box-shadow: none; + background: none; +}