mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-16 04:56:18 +00:00
@@ -449,7 +449,8 @@ class _FileManagerViewState extends State<FileManagerView> {
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: FutureBuilder<String>(
|
||||
future: bind.sessionGetPlatform(
|
||||
id: _ffi.id, isRemote: !isLocal),
|
||||
sessionId: _ffi.sessionId,
|
||||
isRemote: !isLocal),
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasData &&
|
||||
snapshot.data!.isNotEmpty) {
|
||||
|
||||
@@ -194,7 +194,7 @@ class _PortForwardPageState extends State<PortForwardPage>
|
||||
(remoteHostController.text.isEmpty ||
|
||||
remoteHostController.text.trim().isNotEmpty)) {
|
||||
await bind.sessionAddPortForward(
|
||||
id: 'pf_${widget.id}',
|
||||
sessionId: _ffi.sessionId,
|
||||
localPort: localPort,
|
||||
remoteHost: remoteHostController.text.trim().isEmpty
|
||||
? 'localhost'
|
||||
@@ -254,7 +254,7 @@ class _PortForwardPageState extends State<PortForwardPage>
|
||||
icon: const Icon(Icons.close),
|
||||
onPressed: () async {
|
||||
await bind.sessionRemovePortForward(
|
||||
id: 'pf_${widget.id}', localPort: pf.localPort);
|
||||
sessionId: _ffi.sessionId, localPort: pf.localPort);
|
||||
refreshTunnelConfig();
|
||||
},
|
||||
),
|
||||
@@ -313,7 +313,7 @@ class _PortForwardPageState extends State<PortForwardPage>
|
||||
width: 120,
|
||||
child: ElevatedButton(
|
||||
onPressed: () =>
|
||||
bind.sessionNewRdp(id: "pf_${widget.id}"),
|
||||
bind.sessionNewRdp(sessionId: _ffi.sessionId),
|
||||
child: Text(
|
||||
translate('New RDP'),
|
||||
),
|
||||
|
||||
@@ -110,12 +110,12 @@ class _PortForwardTabPageState extends State<PortForwardTabPage> {
|
||||
return Platform.isMacOS || kUseCompatibleUiMode
|
||||
? tabWidget
|
||||
: Obx(
|
||||
() => SubWindowDragToResizeArea(
|
||||
() => SubWindowDragToResizeArea(
|
||||
child: tabWidget,
|
||||
resizeEdgeSize: stateGlobal.resizeEdgeSize.value,
|
||||
windowId: stateGlobal.windowId,
|
||||
),
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
void onRemoveId(String id) {
|
||||
|
||||
@@ -76,6 +76,8 @@ class _RemotePageState extends State<RemotePage>
|
||||
|
||||
late FFI _ffi;
|
||||
|
||||
SessionID get sessionId => _ffi.sessionId;
|
||||
|
||||
void _initStates(String id) {
|
||||
initSharedStates(id);
|
||||
_zoomCursor = PeerBoolOption.find(id, 'zoom-cursor');
|
||||
@@ -117,19 +119,19 @@ class _RemotePageState extends State<RemotePage>
|
||||
debugPrint("id: $id, texture_key: $_textureKey");
|
||||
if (id != -1) {
|
||||
final ptr = await textureRenderer.getTexturePtr(_textureKey);
|
||||
platformFFI.registerTexture(widget.id, ptr);
|
||||
platformFFI.registerTexture(sessionId, ptr);
|
||||
_textureId.value = id;
|
||||
}
|
||||
});
|
||||
}
|
||||
_ffi.ffiModel.updateEventListener(widget.id);
|
||||
_ffi.ffiModel.updateEventListener(sessionId, widget.id);
|
||||
bind.pluginSyncUi(syncTo: kAppTypeDesktopRemote);
|
||||
_ffi.qualityMonitorModel.checkShowQualityMonitor(widget.id);
|
||||
_ffi.qualityMonitorModel.checkShowQualityMonitor(sessionId);
|
||||
// Session option should be set after models.dart/FFI.start
|
||||
_showRemoteCursor.value = bind.sessionGetToggleOptionSync(
|
||||
id: widget.id, arg: 'show-remote-cursor');
|
||||
_zoomCursor.value =
|
||||
bind.sessionGetToggleOptionSync(id: widget.id, arg: 'zoom-cursor');
|
||||
sessionId: sessionId, arg: 'show-remote-cursor');
|
||||
_zoomCursor.value = bind.sessionGetToggleOptionSync(
|
||||
sessionId: sessionId, arg: 'zoom-cursor');
|
||||
DesktopMultiWindow.addListener(this);
|
||||
// if (!_isCustomCursorInited) {
|
||||
// customCursorController.registerNeedUpdateCursorCallback(
|
||||
@@ -203,11 +205,11 @@ class _RemotePageState extends State<RemotePage>
|
||||
void dispose() {
|
||||
debugPrint("REMOTE PAGE dispose ${widget.id}");
|
||||
if (useTextureRender) {
|
||||
platformFFI.registerTexture(widget.id, 0);
|
||||
platformFFI.registerTexture(sessionId, 0);
|
||||
textureRenderer.closeTexture(_textureKey);
|
||||
}
|
||||
// ensure we leave this session, this is a double check
|
||||
bind.sessionEnterOrLeave(id: widget.id, enter: false);
|
||||
bind.sessionEnterOrLeave(sessionId: sessionId, enter: false);
|
||||
DesktopMultiWindow.removeListener(this);
|
||||
_ffi.dialogManager.hideMobileActionsOverlay();
|
||||
_ffi.recordingModel.onClose();
|
||||
@@ -278,7 +280,7 @@ class _RemotePageState extends State<RemotePage>
|
||||
super.build(context);
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
clientClose(widget.id, _ffi.dialogManager);
|
||||
clientClose(sessionId, _ffi.dialogManager);
|
||||
return false;
|
||||
},
|
||||
child: MultiProvider(providers: [
|
||||
@@ -305,7 +307,7 @@ class _RemotePageState extends State<RemotePage>
|
||||
if (!_rawKeyFocusNode.hasFocus) {
|
||||
_rawKeyFocusNode.requestFocus();
|
||||
}
|
||||
bind.sessionEnterOrLeave(id: widget.id, enter: true);
|
||||
bind.sessionEnterOrLeave(sessionId: sessionId, enter: true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -325,7 +327,7 @@ class _RemotePageState extends State<RemotePage>
|
||||
}
|
||||
// See [onWindowBlur].
|
||||
if (!Platform.isWindows) {
|
||||
bind.sessionEnterOrLeave(id: widget.id, enter: false);
|
||||
bind.sessionEnterOrLeave(sessionId: sessionId, enter: false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,11 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
if (peerId != null) {
|
||||
ConnectionTypeState.init(peerId);
|
||||
tabController.onSelected = (_, id) {
|
||||
bind.setCurSessionId(id: id);
|
||||
final remotePage = tabController.state.value.tabs
|
||||
.firstWhere((tab) => tab.key == id)
|
||||
.page as RemotePage;
|
||||
final ffi = remotePage.ffi;
|
||||
bind.setCurSessionId(sessionId: ffi.sessionId);
|
||||
WindowController.fromWindowId(windowId())
|
||||
.setTitle(getWindowNameWithId(id));
|
||||
};
|
||||
@@ -243,6 +247,7 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
final ffi = remotePage.ffi;
|
||||
final pi = ffi.ffiModel.pi;
|
||||
final perms = ffi.ffiModel.permissions;
|
||||
final sessionId = ffi.sessionId;
|
||||
menu.addAll([
|
||||
MenuEntryButton<String>(
|
||||
childBuilder: (TextStyle? style) => Text(
|
||||
@@ -282,6 +287,7 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
menu.add(MenuEntryDivider<String>());
|
||||
menu.add(RemoteMenuEntry.showRemoteCursor(
|
||||
key,
|
||||
sessionId,
|
||||
padding,
|
||||
dismissFunc: cancelFunc,
|
||||
));
|
||||
@@ -289,15 +295,15 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
|
||||
if (perms['keyboard'] != false && !ffi.ffiModel.viewOnly) {
|
||||
if (perms['clipboard'] != false) {
|
||||
menu.add(RemoteMenuEntry.disableClipboard(key, padding,
|
||||
menu.add(RemoteMenuEntry.disableClipboard(sessionId, padding,
|
||||
dismissFunc: cancelFunc));
|
||||
}
|
||||
|
||||
menu.add(
|
||||
RemoteMenuEntry.insertLock(key, padding, dismissFunc: cancelFunc));
|
||||
menu.add(RemoteMenuEntry.insertLock(sessionId, padding,
|
||||
dismissFunc: cancelFunc));
|
||||
|
||||
if (pi.platform == kPeerPlatformLinux || pi.sasEnabled) {
|
||||
menu.add(RemoteMenuEntry.insertCtrlAltDel(key, padding,
|
||||
menu.add(RemoteMenuEntry.insertCtrlAltDel(sessionId, padding,
|
||||
dismissFunc: cancelFunc));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class _DesktopServerPageState extends State<DesktopServerPage>
|
||||
final tabController = gFFI.serverModel.tabController;
|
||||
@override
|
||||
void initState() {
|
||||
gFFI.ffiModel.updateEventListener("");
|
||||
gFFI.ffiModel.updateEventListener(gFFI.sessionId, "");
|
||||
windowManager.addListener(this);
|
||||
tabController.onRemoved = (_, id) {
|
||||
onRemoveId(id);
|
||||
|
||||
@@ -141,14 +141,16 @@ class RemoteMenuEntry {
|
||||
],
|
||||
curOptionGetter: () async {
|
||||
// null means peer id is not found, which there's no need to care about
|
||||
final viewStyle = await bind.sessionGetViewStyle(id: remoteId) ?? '';
|
||||
final viewStyle =
|
||||
await bind.sessionGetViewStyle(sessionId: ffi.sessionId) ?? '';
|
||||
if (rxViewStyle != null) {
|
||||
rxViewStyle.value = viewStyle;
|
||||
}
|
||||
return viewStyle;
|
||||
},
|
||||
optionSetter: (String oldValue, String newValue) async {
|
||||
await bind.sessionSetViewStyle(id: remoteId, value: newValue);
|
||||
await bind.sessionSetViewStyle(
|
||||
sessionId: ffi.sessionId, value: newValue);
|
||||
if (rxViewStyle != null) {
|
||||
rxViewStyle.value = newValue;
|
||||
}
|
||||
@@ -165,6 +167,7 @@ class RemoteMenuEntry {
|
||||
|
||||
static MenuEntrySwitch2<String> showRemoteCursor(
|
||||
String remoteId,
|
||||
SessionID sessionId,
|
||||
EdgeInsets padding, {
|
||||
DismissFunc? dismissFunc,
|
||||
DismissCallback? dismissCallback,
|
||||
@@ -178,9 +181,9 @@ class RemoteMenuEntry {
|
||||
return state;
|
||||
},
|
||||
setter: (bool v) async {
|
||||
await bind.sessionToggleOption(id: remoteId, value: optKey);
|
||||
await bind.sessionToggleOption(sessionId: sessionId, value: optKey);
|
||||
state.value =
|
||||
bind.sessionGetToggleOptionSync(id: remoteId, arg: optKey);
|
||||
bind.sessionGetToggleOptionSync(sessionId: sessionId, arg: optKey);
|
||||
if (dismissFunc != null) {
|
||||
dismissFunc();
|
||||
}
|
||||
@@ -192,13 +195,13 @@ class RemoteMenuEntry {
|
||||
}
|
||||
|
||||
static MenuEntrySwitch<String> disableClipboard(
|
||||
String remoteId,
|
||||
SessionID sessionId,
|
||||
EdgeInsets? padding, {
|
||||
DismissFunc? dismissFunc,
|
||||
DismissCallback? dismissCallback,
|
||||
}) {
|
||||
return createSwitchMenuEntry(
|
||||
remoteId,
|
||||
sessionId,
|
||||
'Disable clipboard',
|
||||
'disable-clipboard',
|
||||
padding,
|
||||
@@ -208,7 +211,7 @@ class RemoteMenuEntry {
|
||||
}
|
||||
|
||||
static MenuEntrySwitch<String> createSwitchMenuEntry(
|
||||
String remoteId,
|
||||
SessionID sessionId,
|
||||
String text,
|
||||
String option,
|
||||
EdgeInsets? padding,
|
||||
@@ -220,10 +223,11 @@ class RemoteMenuEntry {
|
||||
switchType: SwitchType.scheckbox,
|
||||
text: translate(text),
|
||||
getter: () async {
|
||||
return bind.sessionGetToggleOptionSync(id: remoteId, arg: option);
|
||||
return bind.sessionGetToggleOptionSync(
|
||||
sessionId: sessionId, arg: option);
|
||||
},
|
||||
setter: (bool v) async {
|
||||
await bind.sessionToggleOption(id: remoteId, value: option);
|
||||
await bind.sessionToggleOption(sessionId: sessionId, value: option);
|
||||
if (dismissFunc != null) {
|
||||
dismissFunc();
|
||||
}
|
||||
@@ -235,7 +239,7 @@ class RemoteMenuEntry {
|
||||
}
|
||||
|
||||
static MenuEntryButton<String> insertLock(
|
||||
String remoteId,
|
||||
SessionID sessionId,
|
||||
EdgeInsets? padding, {
|
||||
DismissFunc? dismissFunc,
|
||||
DismissCallback? dismissCallback,
|
||||
@@ -246,7 +250,7 @@ class RemoteMenuEntry {
|
||||
style: style,
|
||||
),
|
||||
proc: () {
|
||||
bind.sessionLockScreen(id: remoteId);
|
||||
bind.sessionLockScreen(sessionId: sessionId);
|
||||
if (dismissFunc != null) {
|
||||
dismissFunc();
|
||||
}
|
||||
@@ -258,7 +262,7 @@ class RemoteMenuEntry {
|
||||
}
|
||||
|
||||
static insertCtrlAltDel(
|
||||
String remoteId,
|
||||
SessionID sessionId,
|
||||
EdgeInsets? padding, {
|
||||
DismissFunc? dismissFunc,
|
||||
DismissCallback? dismissCallback,
|
||||
@@ -269,7 +273,7 @@ class RemoteMenuEntry {
|
||||
style: style,
|
||||
),
|
||||
proc: () {
|
||||
bind.sessionCtrlAltDel(id: remoteId);
|
||||
bind.sessionCtrlAltDel(sessionId: sessionId);
|
||||
if (dismissFunc != null) {
|
||||
dismissFunc();
|
||||
}
|
||||
@@ -329,7 +333,8 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
||||
|
||||
Future.delayed(Duration.zero, () async {
|
||||
_fractionX.value = double.tryParse(await bind.sessionGetOption(
|
||||
id: widget.id, arg: 'remote-menubar-drag-x') ??
|
||||
sessionId: widget.ffi.sessionId,
|
||||
arg: 'remote-menubar-drag-x') ??
|
||||
'0.5') ??
|
||||
0.5;
|
||||
});
|
||||
@@ -387,7 +392,7 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
||||
elevation: _MenubarTheme.elevation,
|
||||
shadowColor: MyTheme.color(context).shadow,
|
||||
child: _DraggableShowHide(
|
||||
id: widget.id,
|
||||
sessionId: widget.ffi.sessionId,
|
||||
dragging: _dragging,
|
||||
fractionX: _fractionX,
|
||||
show: show,
|
||||
@@ -621,7 +626,7 @@ class _MonitorMenu extends StatelessWidget {
|
||||
_menuDismissCallback(ffi);
|
||||
RxInt display = CurrentDisplayState.find(id);
|
||||
if (display.value != i) {
|
||||
bind.sessionSwitchDisplay(id: id, value: i);
|
||||
bind.sessionSwitchDisplay(sessionId: ffi.sessionId, value: i);
|
||||
}
|
||||
},
|
||||
));
|
||||
@@ -763,7 +768,8 @@ class ScreenAdjustor {
|
||||
}
|
||||
|
||||
Future<bool> isWindowCanBeAdjusted() async {
|
||||
final viewStyle = await bind.sessionGetViewStyle(id: id) ?? '';
|
||||
final viewStyle =
|
||||
await bind.sessionGetViewStyle(sessionId: ffi.sessionId) ?? '';
|
||||
if (viewStyle != kRemoteViewStyleOriginal) {
|
||||
return false;
|
||||
}
|
||||
@@ -885,9 +891,11 @@ class _DisplayMenuState extends State<_DisplayMenu> {
|
||||
|
||||
scrollStyle() {
|
||||
return futureBuilder(future: () async {
|
||||
final viewStyle = await bind.sessionGetViewStyle(id: id) ?? '';
|
||||
final viewStyle =
|
||||
await bind.sessionGetViewStyle(sessionId: ffi.sessionId) ?? '';
|
||||
final visible = viewStyle == kRemoteViewStyleOriginal;
|
||||
final scrollStyle = await bind.sessionGetScrollStyle(id: widget.id) ?? '';
|
||||
final scrollStyle =
|
||||
await bind.sessionGetScrollStyle(sessionId: ffi.sessionId) ?? '';
|
||||
return {'visible': visible, 'scrollStyle': scrollStyle};
|
||||
}(), hasData: (data) {
|
||||
final visible = data['visible'] as bool;
|
||||
@@ -895,7 +903,8 @@ class _DisplayMenuState extends State<_DisplayMenu> {
|
||||
final groupValue = data['scrollStyle'] as String;
|
||||
onChange(String? value) async {
|
||||
if (value == null) return;
|
||||
await bind.sessionSetScrollStyle(id: widget.id, value: value);
|
||||
await bind.sessionSetScrollStyle(
|
||||
sessionId: ffi.sessionId, value: value);
|
||||
widget.ffi.canvasModel.updateScrollStyle();
|
||||
}
|
||||
|
||||
@@ -1007,6 +1016,7 @@ class _ResolutionsMenuState extends State<_ResolutionsMenu> {
|
||||
late final TextEditingController _customHeight =
|
||||
TextEditingController(text: display.height.toString());
|
||||
|
||||
FFI get ffi => widget.ffi;
|
||||
PeerInfo get pi => widget.ffi.ffiModel.pi;
|
||||
FfiModel get ffiModel => widget.ffi.ffiModel;
|
||||
Display get display => ffiModel.display;
|
||||
@@ -1101,7 +1111,7 @@ class _ResolutionsMenuState extends State<_ResolutionsMenu> {
|
||||
|
||||
_changeResolution(int w, int h) async {
|
||||
await bind.sessionChangeResolution(
|
||||
id: widget.id,
|
||||
sessionId: ffi.sessionId,
|
||||
display: pi.currentDisplay,
|
||||
width: w,
|
||||
height: h,
|
||||
@@ -1254,12 +1264,15 @@ class _KeyboardMenu extends StatelessWidget {
|
||||
if (!ffiModel.keyboard) return Offstage();
|
||||
String? modeOnly;
|
||||
if (stateGlobal.grabKeyboard) {
|
||||
if (bind.sessionIsKeyboardModeSupported(id: id, mode: _kKeyMapMode)) {
|
||||
bind.sessionSetKeyboardMode(id: id, value: _kKeyMapMode);
|
||||
if (bind.sessionIsKeyboardModeSupported(
|
||||
sessionId: ffi.sessionId, mode: _kKeyMapMode)) {
|
||||
bind.sessionSetKeyboardMode(
|
||||
sessionId: ffi.sessionId, value: _kKeyMapMode);
|
||||
modeOnly = _kKeyMapMode;
|
||||
} else if (bind.sessionIsKeyboardModeSupported(
|
||||
id: id, mode: _kKeyLegacyMode)) {
|
||||
bind.sessionSetKeyboardMode(id: id, value: _kKeyLegacyMode);
|
||||
sessionId: ffi.sessionId, mode: _kKeyLegacyMode)) {
|
||||
bind.sessionSetKeyboardMode(
|
||||
sessionId: ffi.sessionId, value: _kKeyLegacyMode);
|
||||
modeOnly = _kKeyLegacyMode;
|
||||
}
|
||||
}
|
||||
@@ -1279,7 +1292,8 @@ class _KeyboardMenu extends StatelessWidget {
|
||||
|
||||
mode(String? modeOnly) {
|
||||
return futureBuilder(future: () async {
|
||||
return await bind.sessionGetKeyboardMode(id: id) ?? _kKeyLegacyMode;
|
||||
return await bind.sessionGetKeyboardMode(sessionId: ffi.sessionId) ??
|
||||
_kKeyLegacyMode;
|
||||
}(), hasData: (data) {
|
||||
final groupValue = data as String;
|
||||
List<KeyboardModeMenu> modes = [
|
||||
@@ -1291,14 +1305,15 @@ class _KeyboardMenu extends StatelessWidget {
|
||||
final enabled = !ffi.ffiModel.viewOnly;
|
||||
onChanged(String? value) async {
|
||||
if (value == null) return;
|
||||
await bind.sessionSetKeyboardMode(id: id, value: value);
|
||||
await bind.sessionSetKeyboardMode(
|
||||
sessionId: ffi.sessionId, value: value);
|
||||
}
|
||||
|
||||
for (KeyboardModeMenu mode in modes) {
|
||||
if (modeOnly != null && mode.key != modeOnly) {
|
||||
continue;
|
||||
} else if (!bind.sessionIsKeyboardModeSupported(
|
||||
id: id, mode: mode.key)) {
|
||||
sessionId: ffi.sessionId, mode: mode.key)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1351,7 +1366,8 @@ class _KeyboardMenu extends StatelessWidget {
|
||||
onChanged: enabled
|
||||
? (value) async {
|
||||
if (value == null) return;
|
||||
await bind.sessionToggleOption(id: id, value: 'view-only');
|
||||
await bind.sessionToggleOption(
|
||||
sessionId: ffi.sessionId, value: 'view-only');
|
||||
ffiModel.setViewOnly(id, value);
|
||||
}
|
||||
: null,
|
||||
@@ -1412,7 +1428,8 @@ class _ChatMenuState extends State<_ChatMenu> {
|
||||
return MenuButton(
|
||||
child: Text(translate('Voice call')),
|
||||
ffi: widget.ffi,
|
||||
onPressed: () => bind.sessionRequestVoiceCall(id: widget.id),
|
||||
onPressed: () =>
|
||||
bind.sessionRequestVoiceCall(sessionId: widget.ffi.sessionId),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1447,7 +1464,8 @@ class _VoiceCallMenu extends StatelessWidget {
|
||||
return _IconMenuButton(
|
||||
assetName: icon,
|
||||
tooltip: tooltip,
|
||||
onPressed: () => bind.sessionCloseVoiceCall(id: id),
|
||||
onPressed: () =>
|
||||
bind.sessionCloseVoiceCall(sessionId: ffi.sessionId),
|
||||
color: _MenubarTheme.redColor,
|
||||
hoverColor: _MenubarTheme.hoverRedColor);
|
||||
},
|
||||
@@ -1492,7 +1510,7 @@ class _CloseMenu extends StatelessWidget {
|
||||
return _IconMenuButton(
|
||||
assetName: 'assets/close.svg',
|
||||
tooltip: 'Close',
|
||||
onPressed: () => clientClose(id, ffi.dialogManager),
|
||||
onPressed: () => clientClose(ffi.sessionId, ffi.dialogManager),
|
||||
color: _MenubarTheme.redColor,
|
||||
hoverColor: _MenubarTheme.hoverRedColor,
|
||||
);
|
||||
@@ -1753,13 +1771,13 @@ class RdoMenuButton<T> extends StatelessWidget {
|
||||
}
|
||||
|
||||
class _DraggableShowHide extends StatefulWidget {
|
||||
final String id;
|
||||
final SessionID sessionId;
|
||||
final RxDouble fractionX;
|
||||
final RxBool dragging;
|
||||
final RxBool show;
|
||||
const _DraggableShowHide({
|
||||
Key? key,
|
||||
required this.id,
|
||||
required this.sessionId,
|
||||
required this.fractionX,
|
||||
required this.dragging,
|
||||
required this.show,
|
||||
@@ -1826,7 +1844,7 @@ class _DraggableShowHideState extends State<_DraggableShowHide> {
|
||||
widget.fractionX.value = right;
|
||||
}
|
||||
bind.sessionPeerOption(
|
||||
id: widget.id,
|
||||
sessionId: widget.sessionId,
|
||||
name: 'remote-menubar-drag-x',
|
||||
value: widget.fractionX.value.toString(),
|
||||
);
|
||||
@@ -1952,7 +1970,7 @@ class _MultiMonitorMenu extends StatelessWidget {
|
||||
),
|
||||
onPressed: () {
|
||||
if (display.value != i) {
|
||||
bind.sessionSwitchDisplay(id: id, value: i);
|
||||
bind.sessionSwitchDisplay(sessionId: ffi.sessionId, value: i);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
@@ -17,6 +17,7 @@ import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get_rx/src/rx_workers/utils/debouncer.dart';
|
||||
import 'package:scroll_pos/scroll_pos.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
|
||||
import '../../utils/multi_window_manager.dart';
|
||||
|
||||
Reference in New Issue
Block a user