Go to file
Jonas Dreßler 68e3f74ffd search: Don't use max number of results if allocation width is 0
Since commit 1a27ff6130 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
2019-08-08 17:37:12 +00:00
.gitlab-ci
.settings
data dateMenu: Stop accessing app settings directly 2019-08-08 17:41:46 +02:00
docs/reference
js search: Don't use max number of results if allocation width is 0 2019-08-08 17:37:12 +00:00
lint
man
meson
po Update Indonesian translation 2019-08-06 10:49:56 +00:00
src shell/app-system: Monitor for icon theme changes 2019-08-08 15:22:44 +00:00
subprojects
test
tests
tools
.eslintrc.json
.gitignore
.gitlab-ci.yml
.gitmodules
cldr2json.py Fix override for fr-CA 2019-03-04 20:55:15 +00:00
config.h.meson
COPYING
gnome-shell.doap
HACKING.md docs: Update animation section 2019-08-07 18:40:49 +02:00
meson_options.txt
meson.build
NEWS
README.md
README.mdwn

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.