Disconnect close-request signal before exit

This commit is contained in:
Rafostar
2020-11-09 21:35:17 +01:00
parent fa131c0356
commit 314b66b7fd

View File

@@ -377,7 +377,7 @@ class ClapperPlayer extends PlayerBase
let root = this.widget.get_root(); let root = this.widget.get_root();
if(!root) return; if(!root) return;
root.connect('close-request', this._onCloseRequest.bind(this)); this.closeRequestSignal = root.connect('close-request', this._onCloseRequest.bind(this));
} }
/* Widget only - does not happen when using controls navigation */ /* Widget only - does not happen when using controls navigation */
@@ -604,6 +604,9 @@ class ClapperPlayer extends PlayerBase
_onCloseRequest(window) _onCloseRequest(window)
{ {
window.disconnect(this.closeRequestSignal);
this.closeRequestSignal = null;
let clapperWidget = this.widget.get_ancestor(Gtk.Grid); let clapperWidget = this.widget.get_ancestor(Gtk.Grid);
if(!clapperWidget.fullscreenMode) { if(!clapperWidget.fullscreenMode) {
let size = window.get_size(); let size = window.get_size();