Commit a1128f12 authored by Jan Grulich's avatar Jan Grulich

ScreenSharing: close dialogs when session is closed

Summary:
When session is closed, for example when user cancells the request through a browser dialog, we
also need to close the portal dialog.

Reviewers: apol, #plasma

Reviewed By: apol

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D28618
parent d6d8e31b
......@@ -124,6 +124,8 @@ uint RemoteDesktopPortal::Start(const QDBusObjectPath &handle,
QScopedPointer<RemoteDesktopDialog, QScopedPointerDeleteLater> remoteDesktopDialog(new RemoteDesktopDialog(app_id, session->deviceTypes(), session->screenSharingEnabled(), session->multipleSources()));
Utils::setParentWindow(remoteDesktopDialog.data(), parent_window);
connect(session, &Session::closed, remoteDesktopDialog.data(), &RemoteDesktopDialog::reject);
if (remoteDesktopDialog->exec()) {
if (session->screenSharingEnabled()) {
if (!WaylandIntegration::startStreaming(remoteDesktopDialog->selectedScreens().first())) {
......
......@@ -147,6 +147,8 @@ uint ScreenCastPortal::Start(const QDBusObjectPath &handle,
QScopedPointer<ScreenChooserDialog, QScopedPointerDeleteLater> screenDialog(new ScreenChooserDialog(app_id, session->multipleSources()));
Utils::setParentWindow(screenDialog.data(), parent_window);
connect(session, &Session::closed, screenDialog.data(), &ScreenChooserDialog::reject);
if (screenDialog->exec()) {
if (!WaylandIntegration::startStreaming(screenDialog->selectedScreens().first())) {
return 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment