appDisplay: Do not bind popdown call to grabHelper onUngrab

grabHelper is passing a boolean argument to onUngrab() callback function
and since commit 1acbdcc9b3 we'd end up adding it to to the callback list or
we'd try to invoke it:

 (gnome-shell:3490851): Gjs-CRITICAL **: 17:19:20.460: JS ERROR:
  TypeError: func is not a function
  onComplete/<@/media/M2/GNOME/gnome-shell/js/ui/appDisplay.js:2407:56
  onComplete@/media/M2/GNOME/gnome-shell/js/ui/appDisplay.js:2407:40
  _makeEaseCallback/<@/media/M2/GNOME/gnome-shell/js/ui/environment.js:85:13
  _easeActor/<@/media/M2/GNOME/gnome-shell/js/ui/environment.js:170:64

Use an arrow function so that we can control the parameters we pass
to popdown.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1635>
This commit is contained in:
Marco Trevisan (Treviño) 2021-02-04 17:37:02 +01:00
parent f5b622a703
commit e641547ddf

View File

@ -2574,8 +2574,10 @@ var AppFolderDialog = GObject.registerClass({
if (this._isOpen) if (this._isOpen)
return; return;
this._isOpen = this._grabHelper.grab({ actor: this, this._isOpen = this._grabHelper.grab({
onUngrab: this.popdown.bind(this) }); actor: this,
onUngrab: () => this.popdown(),
});
if (!this._isOpen) if (!this._isOpen)
return; return;