gnome-shell/js/ui
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
..
components cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
status volume: Fix overdrive in slider 2019-08-07 16:17:45 +00:00
accessDialog.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
altTab.js js: Use implicit animations for animatable properties 2019-08-06 23:54:29 +02:00
animation.js js: Use implicit animations for animatable properties 2019-08-06 23:54:29 +02:00
appDisplay.js appDisplay: Animate activate-discrete-gpu action in the AppIconMenu 2019-08-08 16:48:48 +00:00
appFavorites.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
audioDeviceSelection.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
background.js js: Use implicit animations for animatable properties 2019-08-06 23:54:29 +02:00
backgroundMenu.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
barLevel.js barLevel: Fix value range 2019-08-07 16:17:45 +00:00
boxpointer.js js: Use implicit animations for animatable properties 2019-08-06 23:54:29 +02:00
calendar.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
checkBox.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
closeDialog.js js: Use implicit animations for animatable properties 2019-08-06 23:54:29 +02:00
ctrlAltTab.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
dash.js js: Use implicit animations for animatable properties 2019-08-06 23:54:29 +02:00
dateMenu.js dateMenu: Stop accessing app settings directly 2019-08-08 17:41:46 +02:00
dialog.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
dnd.js dnd: Stop using getTweenCount() 2019-08-07 18:40:49 +02:00
edgeDragAction.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
endSessionDialog.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
environment.js environment: Add convenience method for adjustment transitions 2019-08-07 18:40:49 +02:00
extensionDownloader.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
extensionSystem.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
focusCaretTracker.js cleanup: Prefer template strings 2019-07-05 11:32:31 +00:00
grabHelper.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
ibusCandidatePopup.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
iconGrid.js folderIcon: Update folder icon after dropping 2019-08-08 09:11:59 -03:00
inhibitShortcutsDialog.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
kbdA11yDialog.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
keyboard.js js: Ease non-animatable actor properties 2019-08-06 23:54:29 +02:00
layout.js js: Use implicit animations for animatable properties 2019-08-06 23:54:29 +02:00
lightbox.js js: Ease non-animatable actor properties 2019-08-06 23:54:29 +02:00
locatePointer.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
lookingGlass.js lookingGlass: Remove Tweener from preimported modules 2019-08-07 18:40:49 +02:00
magnifier.js cleanup: Mark unused (but useful) variables as ignored 2019-07-24 00:28:45 +02:00
magnifierDBus.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
main.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
messageList.js js: Ease non-animatable actor properties 2019-08-06 23:54:29 +02:00
messageTray.js js: Use implicit animations for animatable properties 2019-08-06 23:54:29 +02:00
modalDialog.js js: Use implicit animations for animatable properties 2019-08-06 23:54:29 +02:00
mpris.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
notificationDaemon.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
osdMonitorLabeler.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
osdWindow.js js: Ease non-animatable actor properties 2019-08-06 23:54:29 +02:00
overview.js js: Ease non-animatable actor properties 2019-08-06 23:54:29 +02:00
overviewControls.js controlsManager: Don't fade icon grid while dragging 2019-08-08 09:12:00 -03:00
padOsd.js style: Disable camelcase rule for GObject properties 2019-07-24 00:28:45 +02:00
pageIndicators.js js: Use implicit animations for animatable properties 2019-08-06 23:54:29 +02:00
panel.js js: Use implicit animations for animatable properties 2019-08-06 23:54:29 +02:00
panelMenu.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
pointerA11yTimeout.js js: Use implicit animations for animatable properties 2019-08-06 23:54:29 +02:00
pointerWatcher.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
popupMenu.js js: Use implicit animations for animatable properties 2019-08-06 23:54:29 +02:00
remoteSearch.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
ripples.js js: Use implicit animations for animatable properties 2019-08-06 23:54:29 +02:00
runDialog.js js: Use implicit animations for animatable properties 2019-08-06 23:54:29 +02:00
screencast.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
screenShield.js js: Use implicit animations for animatable properties 2019-08-06 23:54:29 +02:00
screenshot.js js: Use implicit animations for animatable properties 2019-08-06 23:54:29 +02:00
scripting.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
search.js search: Don't use max number of results if allocation width is 0 2019-08-08 17:37:12 +00:00
sessionMode.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
shellDBus.js shellDBus: Use floats instead of percentages for OSD levels 2019-07-28 17:27:53 +02:00
shellEntry.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
shellMountOperation.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
slider.js js: Actorize animated objects 2019-08-06 23:54:29 +02:00
switcherPopup.js js: Use Clutter transitions for adjustment changes 2019-08-07 18:40:49 +02:00
switchMonitor.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
tweener.js tweener: Use new adjustAnimationTime() helper 2019-08-06 20:50:43 +02:00
unlockDialog.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
userWidget.js userWidget: Handle non-square icons gracefully 2019-07-29 16:16:22 +00:00
viewSelector.js controlsManager: Don't fade icon grid while dragging 2019-08-08 09:12:00 -03:00
windowAttentionHandler.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
windowManager.js keybindings: Remove pause-resume-tweens shortcut 2019-08-07 18:40:49 +02:00
windowMenu.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
workspace.js workspace: Sort windows to minimize travel distance 2019-08-08 13:13:35 +02:00
workspacesView.js js: Use Clutter transitions for adjustment changes 2019-08-07 18:40:49 +02:00
workspaceSwitcherPopup.js js: Use implicit animations for animatable properties 2019-08-06 23:54:29 +02:00
workspaceThumbnail.js js: Ease non-animatable actor properties 2019-08-06 23:54:29 +02:00
xdndHandler.js cleanup: Mark unused (but useful) variables as ignored 2019-07-24 00:28:45 +02:00