mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-12-23 01:59:49 +01:00
session: destroy screencast_instance directly when paused
A PipeWire client might pause the stream which enables us to stop requesting buffers from the compositor. In this case the the quit bool won't be enacted on and thus we should destroy it directly from here.
This commit is contained in:
parent
10a07f7e90
commit
21d26fe23e
1 changed files with 7 additions and 1 deletions
|
@ -68,7 +68,13 @@ void xdpw_session_destroy(struct xdpw_session *sess) {
|
|||
logprint(DEBUG, "xdpw: screencast instance %p now has %d references",
|
||||
cast, cast->refcount);
|
||||
if (cast->refcount < 1) {
|
||||
cast->quit = true;
|
||||
if (cast->frame_state == XDPW_FRAME_STATE_NONE) {
|
||||
logprint(TRACE, "xdpw: screencast instance not streaming, destroy it");
|
||||
xdpw_screencast_instance_destroy(cast);
|
||||
} else {
|
||||
logprint(TRACE, "xdpw: screencast instance still streaming, set quit flag");
|
||||
cast->quit = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue