mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-11-26 23:57:33 +00:00
feat(flutter): add the DRM capture switch to the Wayland settings card and home warnings
Settings > General > Wayland gets a "Use DRM screen capture" checkbox on an installed Linux client, with the explanation shown below it: it skips the Wayland screen sharing prompt (the login screen too), may not work on every device, and switching it disconnects current sessions. Flatpak and AppImage are not installed builds, so they do not show it. On the home page, an installed client with the option off now offers an "Enable" button on the Wayland session and Wayland login screen warnings, and shows neither warning once it is on. Builds that are not installed, and clients where the option is fixed, keep the existing warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF
This commit is contained in:
1 parent
ea48575430
commit
08b47a50cb
3 files changed
+29
-1
No files matched your search
@@ -105,6 +105,7 @@ const String kOptionAutoDisconnectTimeout = "auto-disconnect-timeout";
|
||||
const String kOptionEnableHwcodec = "enable-hwcodec";
|
||||
const String kOptionAllowAutoRecordIncoming = "allow-auto-record-incoming";
|
||||
const String kOptionAllowAutoRecordOutgoing = "allow-auto-record-outgoing";
|
||||
const String kOptionAllowDrmCapture = "allow-drm-capture";
|
||||
const String kOptionHideRecordingButton = "hide-recording-button";
|
||||
const String kOptionVideoSaveDirectory = "video-save-directory";
|
||||
const String kOptionAccessMode = "access-mode";
|
||||
|
||||
@@ -549,7 +549,26 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
));
|
||||
}
|
||||
}
|
||||
if (bind.mainCurrentIsWayland()) {
|
||||
final installed = bind.mainIsInstalled();
|
||||
if (installed && mainGetBoolOptionSync(kOptionAllowDrmCapture)) {
|
||||
// DRM capture reaches the session and the login screen: no warning.
|
||||
} else if (installed &&
|
||||
!isOptionFixed(kOptionAllowDrmCapture) &&
|
||||
(bind.mainCurrentIsWayland() || bind.mainIsLoginWayland())) {
|
||||
final currentIsWayland = bind.mainCurrentIsWayland();
|
||||
LinuxCards.add(buildInstallCard(
|
||||
"Warning",
|
||||
currentIsWayland ? "wayland-drm-tip" : "login-wayland-drm-tip",
|
||||
"Enable", () async {
|
||||
await mainSetBoolOption(kOptionAllowDrmCapture, true);
|
||||
setState(() {});
|
||||
},
|
||||
marginTop: LinuxCards.isEmpty ? 20.0 : 5.0,
|
||||
help: 'Help',
|
||||
link: currentIsWayland
|
||||
? 'https://rustdesk.com/docs/en/client/linux/#x11-required'
|
||||
: 'https://rustdesk.com/docs/en/client/linux/#login-screen'));
|
||||
} else if (bind.mainCurrentIsWayland()) {
|
||||
LinuxCards.add(buildInstallCard(
|
||||
"Warning", "wayland_experiment_tip", "", () async {},
|
||||
marginTop: LinuxCards.isEmpty ? 20.0 : 5.0,
|
||||
|
||||
@@ -2890,6 +2890,14 @@ class _WaylandCardState extends State<WaylandCard> {
|
||||
"true";
|
||||
|
||||
final children = [
|
||||
if (isLinux && bind.mainIsInstalled() && !bind.isOutgoingOnly()) ...[
|
||||
_OptionCheckBox(
|
||||
context, 'Use DRM screen capture', kOptionAllowDrmCapture),
|
||||
Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: Text(translate('drm-capture-tip')),
|
||||
).marginOnly(left: _kCardLeftMargin),
|
||||
],
|
||||
if (restoreToken.isNotEmpty)
|
||||
_buildClearScreenSelection(context, restoreToken),
|
||||
if (hasShortcutsPermission)
|
||||
|
||||
Reference in new issue
Block a user