bf213af362
Right now the index that gets selected on click and motion events is set when connecting the event inside the addItem function. If items are added or removed (for example when an application is closed by pressing "q"), this index isn't valid anymore and has to be updated. To fix this, use the items themselves instead of the index as arguments for the event handlers and lookup the index of the item inside the event handler. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/167