mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-05-12 02:46:00 +02:00
remove one warn
This commit is contained in:
parent
0174f6d703
commit
3b39a0dc44
1 changed files with 7 additions and 1 deletions
|
@ -1332,7 +1332,13 @@ Future<void> saveWindowPosition(WindowType type, {int? windowId}) async {
|
|||
break;
|
||||
default:
|
||||
final wc = WindowController.fromWindowId(windowId!);
|
||||
final frame = await wc.getFrame();
|
||||
final Rect frame;
|
||||
try {
|
||||
frame = await wc.getFrame();
|
||||
} catch (e) {
|
||||
debugPrint("Failed to get frame of window $windowId, it may be hidden");
|
||||
return;
|
||||
}
|
||||
final position = frame.topLeft;
|
||||
final sz = frame.size;
|
||||
final isMaximized = await wc.isMaximized();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue