mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-22 06:35:57 +01:00
screencopy: properly handle stream resume on all frame statuses
fixes #162
This commit is contained in:
parent
1c802128f6
commit
536e6ed570
1 changed files with 9 additions and 0 deletions
|
@ -751,6 +751,15 @@ static void pwStreamStateChange(void* data, pw_stream_state old, pw_stream_state
|
|||
PSTREAM->streamState = true;
|
||||
if (PSTREAM->pSession->sharingData.status == FRAME_NONE)
|
||||
g_pPortalManager->m_sPortals.screencopy->startFrameCopy(PSTREAM->pSession);
|
||||
else {
|
||||
if (PSTREAM->pSession->sharingData.frameCallback)
|
||||
zwlr_screencopy_frame_v1_destroy(PSTREAM->pSession->sharingData.frameCallback);
|
||||
if (PSTREAM->pSession->sharingData.windowFrameCallback)
|
||||
hyprland_toplevel_export_frame_v1_destroy(PSTREAM->pSession->sharingData.windowFrameCallback);
|
||||
PSTREAM->pSession->sharingData.windowFrameCallback = nullptr;
|
||||
PSTREAM->pSession->sharingData.frameCallback = nullptr;
|
||||
g_pPortalManager->m_sPortals.screencopy->startFrameCopy(PSTREAM->pSession);
|
||||
}
|
||||
break;
|
||||
default: PSTREAM->streamState = false; break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue