slider: Unset signal IDs when ending the slider drag

Unset the signal IDs we connected to when starting the drag. Otherwise
we get error messages if a touch drag is ended after a mouse drag
happened because the signal IDs are still set but no signals are
connected.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/740
This commit is contained in:
Jonas Dreßler 2019-09-22 13:31:02 +02:00 committed by Florian Müllner
parent f3e09b2b2f
commit 2156577333

View File

@ -100,10 +100,15 @@ var Slider = GObject.registerClass({
_endDragging() { _endDragging() {
if (this._dragging) { if (this._dragging) {
if (this._releaseId) if (this._releaseId) {
this.disconnect(this._releaseId); this.disconnect(this._releaseId);
if (this._motionId) this._releaseId = 0;
}
if (this._motionId) {
this.disconnect(this._motionId); this.disconnect(this._motionId);
this._motionId = 0;
}
if (this._grabbedSequence != null) if (this._grabbedSequence != null)
this._grabbedDevice.sequence_ungrab(this._grabbedSequence); this._grabbedDevice.sequence_ungrab(this._grabbedSequence);