appDisplay: Don't iterate over all pages in page manager
In getAppPosition it's not needed to continue looking for an app in the page manager if the app is found in a page. This patch breaks the search loop just after the first ocurrence is found. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1434
This commit is contained in:
parent
386d25e6f8
commit
92d3c6e051
@ -851,11 +851,11 @@ var PageManager = GObject.registerClass({
|
|||||||
for (let pageIndex = 0; pageIndex < this._pages.length; pageIndex++) {
|
for (let pageIndex = 0; pageIndex < this._pages.length; pageIndex++) {
|
||||||
const pageData = this._pages[pageIndex];
|
const pageData = this._pages[pageIndex];
|
||||||
|
|
||||||
if (!(appId in pageData))
|
if (appId in pageData) {
|
||||||
continue;
|
page = pageIndex;
|
||||||
|
position = pageData[appId].position;
|
||||||
page = pageIndex;
|
break;
|
||||||
position = pageData[appId].position;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [page, position];
|
return [page, position];
|
||||||
|
Loading…
Reference in New Issue
Block a user