diff --git a/clapper_src/app.js b/clapper_src/app.js index e429e57c..a3649c88 100644 --- a/clapper_src/app.js +++ b/clapper_src/app.js @@ -390,10 +390,7 @@ var App = GObject.registerClass({ _onWindowCloseRequest() { - this.window.destroy(); - this.player.widget.emit('destroy'); this.interface.emit('destroy'); - this.quit(); } }); diff --git a/clapper_src/interface.js b/clapper_src/interface.js index 602fbf8f..cb2b4b50 100644 --- a/clapper_src/interface.js +++ b/clapper_src/interface.js @@ -468,6 +468,13 @@ class ClapperInterface extends Gtk.Grid _onDestroy() { this.disconnect(this.destroySignal); + + if( + this._player + && this._player.state !== GstPlayer.PlayerState.STOPPED + ) + this._player.stop(); + this.controls.emit('destroy'); } }); diff --git a/clapper_src/player.js b/clapper_src/player.js index fc59430d..0db1e644 100644 --- a/clapper_src/player.js +++ b/clapper_src/player.js @@ -287,9 +287,6 @@ class ClapperPlayer extends GstPlayer.Player while(this._playerSignals.length) this.disconnect(this._playerSignals.pop()); - if(this.state !== GstPlayer.PlayerState.STOPPED) - this.stop(); - if(this.run_loop && this.loop.is_running()) this.loop.quit(); }