1
0
Fork 0

Fix the !110 fix

This commit is contained in:
Térence Clastres 2019-07-30 20:53:20 +02:00
parent 2aab81ce42
commit 790168db6b
3 changed files with 16 additions and 11 deletions

View file

@ -1,7 +1,7 @@
pkgbase = gnome-shell-performance
pkgdesc = Next generation desktop shell | Attempt to improve the performance by non-upstreamed patches
pkgver = 3.32.2+10+g2483b6038
pkgrel = 4
pkgrel = 5
url = https://wiki.gnome.org/Projects/GnomeShell
install = gnome-shell-performance.install
arch = x86_64
@ -43,7 +43,7 @@ pkgbase = gnome-shell-performance
source = 110.patch
sha256sums = SKIP
sha256sums = SKIP
sha256sums = cff49bc57c9cc0e8ac00f0b535eb9c5df39b1f2384337348dbf6e1e88ad7ba40
sha256sums = 733a50776f519827f8c95ee050b4bc95796253fd8e0b666c5eaf655e54380a16
pkgname = gnome-shell-performance

View file

@ -37,7 +37,7 @@ index d51a443e8..60776c542 100644
let usedWidth = this.leftPadding + this.rightPadding;
let spacing = this._getSpacing();
diff --git a/js/ui/search.js b/js/ui/search.js
index fe4f6162b..bd10312d3 100644
index fe4f6162b..f79c47271 100644
--- a/js/ui/search.js
+++ b/js/ui/search.js
@@ -14,8 +14,8 @@ const SEARCH_PROVIDERS_SCHEMA = 'org.gnome.desktop.search-providers';
@ -73,7 +73,7 @@ index fe4f6162b..bd10312d3 100644
this._grid = new IconGrid.IconGrid({ rowLimit: MAX_GRID_SEARCH_RESULTS_ROWS,
xAlign: St.Align.START });
@@ -345,10 +339,25 @@ var GridSearchResults = class extends SearchResultsBase {
@@ -345,10 +339,30 @@ var GridSearchResults = class extends SearchResultsBase {
this._resultDisplayBin.set_child(this._bin);
}
@ -94,15 +94,20 @@ index fe4f6162b..bd10312d3 100644
- let parentThemeNode = this._parentContainer.get_theme_node();
- let availableWidth = parentThemeNode.adjust_for_width(this._parentContainer.width);
- return this._grid.columnsForWidth(availableWidth) * this._grid.getRowLimit();
+ if (!this.actor.has_allocation()) return 1;
+
+ let allocation = this.actor.allocation;
+ let nCols = this._grid.columnsForWidth(allocation.x2 - allocation.x1);
+ return nCols * this._grid.getRowLimit();
+ let nResults = nCols * this._grid.getRowLimit();
+
+ // If the results is 0 we might not get allocated and the fix in
+ // updateSearch() won't work.
+ if (nResults == 0)
+ return 1;
+
+ return nResults;
}
_clearResultDisplay() {
@@ -356,7 +365,7 @@ var GridSearchResults = class extends SearchResultsBase {
@@ -356,7 +370,7 @@ var GridSearchResults = class extends SearchResultsBase {
}
_createResultDisplay(meta) {
@ -111,7 +116,7 @@ index fe4f6162b..bd10312d3 100644
new GridSearchResult(this.provider, meta, this._resultsView);
}
@@ -378,22 +387,16 @@ var SearchResults = class {
@@ -378,22 +392,16 @@ var SearchResults = class {
this.actor = new St.BoxLayout({ name: 'searchResults',
vertical: true });

View file

@ -5,7 +5,7 @@
pkgname=gnome-shell-performance
pkgver=3.32.2+10+g2483b6038
pkgrel=4
pkgrel=5
pkgdesc="Next generation desktop shell | Attempt to improve the performance by non-upstreamed patches"
url="https://wiki.gnome.org/Projects/GnomeShell"
arch=(x86_64)
@ -27,7 +27,7 @@ source=("$pkgname::git+https://gitlab.gnome.org/GNOME/gnome-shell.git#commit=$_c
"110.patch")
sha256sums=('SKIP'
'SKIP'
'cff49bc57c9cc0e8ac00f0b535eb9c5df39b1f2384337348dbf6e1e88ad7ba40')
'733a50776f519827f8c95ee050b4bc95796253fd8e0b666c5eaf655e54380a16')
pkgver() {
cd $pkgname