mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
appDisplay: Don't assume this._placeholder always exists
Dropping a icon from the dash to the application grid will set this._placeholder to null. However the AppIcon is still used to represent the application in the application grid. If we click on it we emit a pressed event. Stop assuming that this._placeholder is still valid in the callback, use the icon parameter instead. This fixes the following error: ``` Gjs-CRITICAL **: 18:22:39.003: JS ERROR: TypeError: this._placeholder is null _ensurePlaceholder/<@resource:///org/gnome/shell/ui/appDisplay.js:1477:17 vfunc_button_press_event@resource:///org/gnome/shell/ui/appDisplay.js:3121:27 ``` Fixes:6fc93b78bcCloses: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6317 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2606> (cherry picked from commitec6ab60e62)
This commit is contained in:
parent
2d66fafbff
commit
98f614b8fa
1 changed files with 3 additions and 3 deletions
|
|
@ -1426,9 +1426,9 @@ class AppDisplay extends BaseAppView {
|
|||
global.settings.is_writable('app-picker-layout');
|
||||
|
||||
this._placeholder = new AppIcon(app, { isDraggable });
|
||||
this._placeholder.connect('notify::pressed', () => {
|
||||
if (this._placeholder.pressed)
|
||||
this.updateDragFocus(this._placeholder);
|
||||
this._placeholder.connect('notify::pressed', icon => {
|
||||
if (icon.pressed)
|
||||
this.updateDragFocus(icon);
|
||||
});
|
||||
this._placeholder.scaleAndFade();
|
||||
this._redisplay();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue