Changeset View
Changeset View
Standalone View
Standalone View
src/remotedesktop.cpp
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | 45 | { | |||
---|---|---|---|---|---|
50 | qCDebug(XdgDesktopPortalKdeRemoteDesktop) << " options: " << options; | 50 | qCDebug(XdgDesktopPortalKdeRemoteDesktop) << " options: " << options; | ||
51 | 51 | | |||
52 | Session *session = Session::createSession(this, Session::RemoteDesktop, app_id, session_handle.path()); | 52 | Session *session = Session::createSession(this, Session::RemoteDesktop, app_id, session_handle.path()); | ||
53 | 53 | | |||
54 | if (!session) { | 54 | if (!session) { | ||
55 | return 2; | 55 | return 2; | ||
56 | } | 56 | } | ||
57 | 57 | | |||
58 | connect(session, &Session::closed, [this] () { | 58 | connect(session, &Session::closed, [] () { | ||
59 | WaylandIntegration::stopStreaming(); | 59 | WaylandIntegration::stopAllStreaming(); | ||
60 | }); | 60 | }); | ||
61 | 61 | | |||
62 | return 0; | 62 | return 0; | ||
63 | } | 63 | } | ||
64 | 64 | | |||
65 | uint RemoteDesktopPortal::SelectDevices(const QDBusObjectPath &handle, | 65 | uint RemoteDesktopPortal::SelectDevices(const QDBusObjectPath &handle, | ||
66 | const QDBusObjectPath &session_handle, | 66 | const QDBusObjectPath &session_handle, | ||
67 | const QString &app_id, | 67 | const QString &app_id, | ||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | 103 | { | |||
123 | 123 | | |||
124 | QScopedPointer<RemoteDesktopDialog, QScopedPointerDeleteLater> remoteDesktopDialog(new RemoteDesktopDialog(app_id, session->deviceTypes(), session->screenSharingEnabled(), session->multipleSources())); | 124 | QScopedPointer<RemoteDesktopDialog, QScopedPointerDeleteLater> remoteDesktopDialog(new RemoteDesktopDialog(app_id, session->deviceTypes(), session->screenSharingEnabled(), session->multipleSources())); | ||
125 | Utils::setParentWindow(remoteDesktopDialog.data(), parent_window); | 125 | Utils::setParentWindow(remoteDesktopDialog.data(), parent_window); | ||
126 | 126 | | |||
127 | connect(session, &Session::closed, remoteDesktopDialog.data(), &RemoteDesktopDialog::reject); | 127 | connect(session, &Session::closed, remoteDesktopDialog.data(), &RemoteDesktopDialog::reject); | ||
128 | 128 | | |||
129 | if (remoteDesktopDialog->exec()) { | 129 | if (remoteDesktopDialog->exec()) { | ||
130 | if (session->screenSharingEnabled()) { | 130 | if (session->screenSharingEnabled()) { | ||
131 | if (!WaylandIntegration::startStreaming(remoteDesktopDialog->selectedScreens().first())) { | 131 | if (!WaylandIntegration::startStreamingOutput(remoteDesktopDialog->selectedScreens().first())) { | ||
132 | return 2; | 132 | return 2; | ||
133 | } | 133 | } | ||
134 | 134 | | |||
135 | WaylandIntegration::authenticate(); | 135 | WaylandIntegration::authenticate(); | ||
136 | 136 | | |||
137 | QVariant streams = WaylandIntegration::streams(); | 137 | QVariant streams = WaylandIntegration::streams(); | ||
138 | 138 | | |||
139 | if (!streams.isValid()) { | 139 | if (!streams.isValid()) { | ||
▲ Show 20 Lines • Show All 172 Lines • Show Last 20 Lines |