mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
Fix player process not exiting after window close
This commit is contained in:
@@ -390,10 +390,7 @@ var App = GObject.registerClass({
|
||||
|
||||
_onWindowCloseRequest()
|
||||
{
|
||||
this.window.destroy();
|
||||
this.player.widget.emit('destroy');
|
||||
this.interface.emit('destroy');
|
||||
|
||||
this.quit();
|
||||
}
|
||||
});
|
||||
|
@@ -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');
|
||||
}
|
||||
});
|
||||
|
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user