![Jonas Dreßler](/assets/img/avatar_default.png)
Since commit 1a27ff6130e03e64d9e426ece72a12e4e2a80f50 we use the allocation width of the GridSearchResults actor to calculate the max number of results that can be shown for this search provider. On the first run of the search, when no previous (cached) allocation is available for the actor of GridSearchResults, the allocation width used in `_getMaxDisplayedResults` will be 0, which in turn will make `updateSearch` filter out all results returned by the search provider. Now if this search provider is the only search provider that's enabled, after calling `updateSearch`, the `SearchResults` class will call `_updateSearchProgress` to check if any results are visible, assume nothing was found and therefore hide the scrollView. This in turn causes the GridSearchResults actor to not get a new allocation, which prevents our code to fixup the max number of results on `notify::allocation` from working: The number will continue to be 0 and we'll never show any results. To fix this regression, return -1 in `_getMaxDisplayedResults` if the allocation width is 0 to inform `updateSearch` that we can't calculate the maximum number yet and interpret a return value of -1 as "show all results" in `updateSearch`. The same problem would probably also appear if the allocation width is anything between 0 and the width of the iconGrid with one icon in it, although this might as well be a valid width in case a very small screen is used or with very large icons. So let's only check for a width of 0 and hope the GridSearchResults actor won't get weird temporary allocations in that range. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/672
GNOME Shell
GNOME Shell provides core user interface functions for the GNOME 3 desktop, like switching to windows and launching applications. GNOME Shell takes advantage of the capabilities of modern graphics hardware and introduces innovative user interface concepts to provide a visually attractive and easy to use experience.
For more information about GNOME Shell, including instructions on how to build GNOME Shell from source and how to get involved with the project, see the project wiki.
Bugs should be reported to the GNOME bug tracking system.
Contributing
To contribute, open merge requests at https://gitlab.gnome.org/GNOME/gnome-shell.
Commit messages should follow the GNOME commit message guidelines. We require an URL to either an issue or a merge request in each commit.
License
GNOME Shell is distributed under the terms of the GNU General Public License, version 2 or later. See the COPYING file for details.