[gnome-shell] workspacesView: Don't update secondary monitor thumbnails box if hidden
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspacesView: Don't update secondary monitor thumbnails box if hidden
- Date: Wed, 12 May 2021 18:12:30 +0000 (UTC)
commit 81210f584607f551de4e4d991e987fc57d309edb
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed May 12 11:55:34 2021 -0300
workspacesView: Don't update secondary monitor thumbnails box if hidden
And save quite a few C/JS trampolines. Since the thumbnails box may not
have up-to-date properties, call _updateThumbnailParams() right after
showing the thumbnails box.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1845>
js/ui/workspacesView.js | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index c2d023cc4f..6aa8b2615b 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -777,6 +777,7 @@ class SecondaryMonitorDisplay extends St.Widget {
return;
this._thumbnails.show();
+ this._updateThumbnailParams();
this._thumbnails.ease_property('expand-fraction', visible ? 1 : 0, {
duration: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
@@ -785,6 +786,9 @@ class SecondaryMonitorDisplay extends St.Widget {
}
_updateThumbnailParams() {
+ if (!this._thumbnails.visible)
+ return;
+
const { initialState, finalState, progress } =
this._overviewAdjustment.getStateTransitionParams();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]