mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-27 23:19:02 +08:00
fix: try workaround, macos, subwindow, frozen (#8729)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
parent
188f85b042
commit
092e4089c7
@ -3,6 +3,7 @@ import 'dart:async';
|
|||||||
import 'package:desktop_multi_window/desktop_multi_window.dart';
|
import 'package:desktop_multi_window/desktop_multi_window.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutter_hbb/main.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:wakelock_plus/wakelock_plus.dart';
|
import 'package:wakelock_plus/wakelock_plus.dart';
|
||||||
@ -417,7 +418,9 @@ class _RemotePageState extends State<RemotePage>
|
|||||||
|
|
||||||
void leaveView(PointerExitEvent evt) {
|
void leaveView(PointerExitEvent evt) {
|
||||||
if (isMacOS) {
|
if (isMacOS) {
|
||||||
DesktopMultiWindow.hideShow();
|
if (kWindowId != null) {
|
||||||
|
DesktopMultiWindow.hideShow(kWindowId!);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_ffi.ffiModel.keyboard) {
|
if (_ffi.ffiModel.keyboard) {
|
||||||
|
@ -141,7 +141,17 @@ class RustDeskMultiWindowManager {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
if (isMacOS) {
|
if (isMacOS) {
|
||||||
Future.microtask(() => windowController.show());
|
Future.microtask(() {
|
||||||
|
windowController.show();
|
||||||
|
// Manually simulate the hide/show event to fix the issue
|
||||||
|
// https://github.com/rustdesk/rustdesk/issues/8548
|
||||||
|
// https://github.com/flutter/flutter/issues/133533
|
||||||
|
// https://github.com/MixinNetwork/flutter-plugins/issues/289#issuecomment-1817665239
|
||||||
|
// https://github.com/rustdesk/rustdesk/pull/8712#issuecomment-2229912473
|
||||||
|
Future.delayed(const Duration(milliseconds: 300), () {
|
||||||
|
DesktopMultiWindow.hideShow(-1);
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
registerActiveWindow(windowId);
|
registerActiveWindow(windowId);
|
||||||
windows.add(windowId);
|
windows.add(windowId);
|
||||||
|
@ -335,7 +335,7 @@ packages:
|
|||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: HEAD
|
ref: HEAD
|
||||||
resolved-ref: "53fee59855c44f35381428c9fb7c7678f700d11d"
|
resolved-ref: "c9ac8e78f8e8f0a554062c2c13cdeb644af2c25b"
|
||||||
url: "https://github.com/rustdesk-org/rustdesk_desktop_multi_window"
|
url: "https://github.com/rustdesk-org/rustdesk_desktop_multi_window"
|
||||||
source: git
|
source: git
|
||||||
version: "0.1.0"
|
version: "0.1.0"
|
||||||
|
Loading…
Reference in New Issue
Block a user