mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
open multi windows, add remote toolbar option
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
@@ -535,5 +535,20 @@ Future<List<TToggleMenu>> toolbarDisplayToggle(
|
||||
child: Text(translate('Show displays as individual windows'))));
|
||||
}
|
||||
|
||||
final screenList = await getScreenRectList();
|
||||
if (useTextureRender && pi.isSupportMultiDisplay && screenList.length > 1) {
|
||||
final value = bind.sessionGetUseAllMyDisplaysForTheRemoteSession(
|
||||
sessionId: ffi.sessionId) ==
|
||||
'Y';
|
||||
v.add(TToggleMenu(
|
||||
value: value,
|
||||
onChanged: (value) {
|
||||
if (value == null) return;
|
||||
bind.sessionSetUseAllMyDisplaysForTheRemoteSession(
|
||||
sessionId: sessionId, value: value ? 'Y' : '');
|
||||
},
|
||||
child: Text(translate('Use all my displays for the remote session'))));
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ const String kPointerEventKindTouch = "touch";
|
||||
const String kPointerEventKindMouse = "mouse";
|
||||
|
||||
const String kKeyShowDisplaysAsIndividualWindows = 'displays_as_individual_windows';
|
||||
const String kKeyUseAllMyMonitorsWhenConnecting = 'use_all_my_monitors_when_connecting';
|
||||
const String kKeyUseAllMyDisplaysForTheRemoteSession = 'use_all_my_displays_for_the_remote_session';
|
||||
const String kKeyShowMonitorsToolbar = 'show_monitors_toolbar';
|
||||
|
||||
// the executable name of the portable version
|
||||
|
||||
@@ -1325,7 +1325,7 @@ class _DisplayState extends State<_Display> {
|
||||
children.add(otherRow('Show displays as individual windows',
|
||||
kKeyShowDisplaysAsIndividualWindows));
|
||||
children.add(otherRow('Use all my displays for the remote session',
|
||||
kKeyUseAllMyMonitorsWhenConnecting));
|
||||
kKeyUseAllMyDisplaysForTheRemoteSession));
|
||||
}
|
||||
return _Card(title: 'Other Default Options', children: children);
|
||||
}
|
||||
|
||||
@@ -705,13 +705,13 @@ class FfiModel with ChangeNotifier {
|
||||
notifyListeners();
|
||||
|
||||
if (!isCache) {
|
||||
tryUseAllMyDisplaysWhenConnecting(peerId);
|
||||
tryUseAllMyDisplaysForTheRemoteSession(peerId);
|
||||
}
|
||||
}
|
||||
|
||||
tryUseAllMyDisplaysWhenConnecting(String peerId) async {
|
||||
if (bind.mainGetUserDefaultOption(
|
||||
key: kKeyUseAllMyMonitorsWhenConnecting) !=
|
||||
tryUseAllMyDisplaysForTheRemoteSession(String peerId) async {
|
||||
if (bind.sessionGetUseAllMyDisplaysForTheRemoteSession(
|
||||
sessionId: sessionId) !=
|
||||
'Y') {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user