[gnome-shell/gnome-41] altTab: Only calculate iconSize once
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-41] altTab: Only calculate iconSize once
- Date: Tue, 15 Feb 2022 16:57:30 +0000 (UTC)
commit 1b53e8c90a200c433d88882c13569ef9cc3c0ef9
Author: Jonas Dreßler <verdre v0yd nl>
Date: Thu Apr 26 01:36:41 2018 +0200
altTab: Only calculate iconSize once
Right now, _setIconSize() calculates the icon size everytime the
preferred height of AppSwitcher is calculated, which happens quite
often.
Reduce the perfomance impact by only calculating the icon size once.
This has the added benefit of preventing unexpected changes to the icon
sizes while the switcher is open.
(cherry picked from commit c8f3db31b896fea895c04b1745bb9cafa3ef2d6d)
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
js/ui/altTab.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
index e7886e4f1e..78450ac789 100644
--- a/js/ui/altTab.js
+++ b/js/ui/altTab.js
@@ -765,7 +765,9 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
}
vfunc_get_preferred_height(forWidth) {
- this._setIconSize();
+ if (!this._iconSize)
+ this._setIconSize();
+
return super.vfunc_get_preferred_height(forWidth);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]