mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-27 14:59:02 +08:00
fix: web, switch display (#9307)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
parent
943f96ef8c
commit
13effe7f14
@ -497,10 +497,12 @@ class FfiModel with ChangeNotifier {
|
||||
newDisplay.width = int.tryParse(evt['width']) ?? newDisplay.width;
|
||||
newDisplay.height = int.tryParse(evt['height']) ?? newDisplay.height;
|
||||
newDisplay.cursorEmbedded = int.tryParse(evt['cursor_embedded']) == 1;
|
||||
newDisplay.originalWidth =
|
||||
int.tryParse(evt['original_width']) ?? kInvalidResolutionValue;
|
||||
newDisplay.originalHeight =
|
||||
int.tryParse(evt['original_height']) ?? kInvalidResolutionValue;
|
||||
newDisplay.originalWidth = int.tryParse(
|
||||
evt['original_width'] ?? kInvalidResolutionValue.toString()) ??
|
||||
kInvalidResolutionValue;
|
||||
newDisplay.originalHeight = int.tryParse(
|
||||
evt['original_height'] ?? kInvalidResolutionValue.toString()) ??
|
||||
kInvalidResolutionValue;
|
||||
newDisplay._scale = _pi.scaleOfDisplay(display);
|
||||
_pi.displays[display] = newDisplay;
|
||||
|
||||
@ -2509,6 +2511,7 @@ class FFI {
|
||||
onEvent2UIRgba();
|
||||
imageModel.onRgba(display, data);
|
||||
});
|
||||
this.id = id;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -391,9 +391,9 @@ class RustdeskImpl {
|
||||
return Future(() => js.context.callMethod('setByName', [
|
||||
'switch_display',
|
||||
jsonEncode({
|
||||
isDesktop: isDesktop,
|
||||
sessionId: sessionId.toString(),
|
||||
value: value
|
||||
'isDesktop': isDesktop,
|
||||
'sessionId': sessionId.toString(),
|
||||
'value': value
|
||||
})
|
||||
]));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user