mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 00:11:59 +02:00
Fix player process not exiting after window close
This commit is contained in:
@@ -390,10 +390,7 @@ var App = GObject.registerClass({
|
|||||||
|
|
||||||
_onWindowCloseRequest()
|
_onWindowCloseRequest()
|
||||||
{
|
{
|
||||||
this.window.destroy();
|
|
||||||
this.player.widget.emit('destroy');
|
|
||||||
this.interface.emit('destroy');
|
this.interface.emit('destroy');
|
||||||
|
|
||||||
this.quit();
|
this.quit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@@ -468,6 +468,13 @@ class ClapperInterface extends Gtk.Grid
|
|||||||
_onDestroy()
|
_onDestroy()
|
||||||
{
|
{
|
||||||
this.disconnect(this.destroySignal);
|
this.disconnect(this.destroySignal);
|
||||||
|
|
||||||
|
if(
|
||||||
|
this._player
|
||||||
|
&& this._player.state !== GstPlayer.PlayerState.STOPPED
|
||||||
|
)
|
||||||
|
this._player.stop();
|
||||||
|
|
||||||
this.controls.emit('destroy');
|
this.controls.emit('destroy');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@@ -287,9 +287,6 @@ class ClapperPlayer extends GstPlayer.Player
|
|||||||
while(this._playerSignals.length)
|
while(this._playerSignals.length)
|
||||||
this.disconnect(this._playerSignals.pop());
|
this.disconnect(this._playerSignals.pop());
|
||||||
|
|
||||||
if(this.state !== GstPlayer.PlayerState.STOPPED)
|
|
||||||
this.stop();
|
|
||||||
|
|
||||||
if(this.run_loop && this.loop.is_running())
|
if(this.run_loop && this.loop.is_running())
|
||||||
this.loop.quit();
|
this.loop.quit();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user