mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-11-26 23:57:33 +00:00
fix(flutter): keep the DRM switch behind disable-settings, ask loginctl once per build
disable-settings hides the Security tab but not General, so the Wayland card's checkbox and the home Enable button both stayed reachable on a locked custom client. With settings disabled the home page falls back to the stock Wayland 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
e6867a2fed
commit
3cda0ebbb0
2 files changed
+16
-13
No files matched your search
@@ -555,20 +555,22 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
// DRM capture reaches the session and the login screen: no warning.
|
||||
} else if (drmSupported &&
|
||||
!isOptionFixed(kOptionAllowDrmCapture) &&
|
||||
(bind.mainCurrentIsWayland() || bind.mainIsLoginWayland())) {
|
||||
!bind.isDisableSettings()) {
|
||||
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'));
|
||||
if (currentIsWayland || bind.mainIsLoginWayland()) {
|
||||
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 {},
|
||||
|
||||
@@ -2893,6 +2893,7 @@ class _WaylandCardState extends State<WaylandCard> {
|
||||
if (isLinux &&
|
||||
bind.mainIsInstalled() &&
|
||||
!bind.isOutgoingOnly() &&
|
||||
!bind.isDisableSettings() &&
|
||||
bind.mainGetCommonSync(key: 'is-drm-capture-supported') ==
|
||||
'true') ...[
|
||||
_OptionCheckBox(
|
||||
|
||||
Reference in new issue
Block a user