Merge pull request #4242 from 21pages/fix

disable wakelock when minisized
This commit is contained in:
RustDesk 2023-04-30 23:25:35 +08:00 committed by GitHub
commit 37449bf44c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,6 +177,17 @@ class _RemotePageState extends State<RemotePage>
if (Platform.isWindows) {
_isWindowBlur = false;
}
if (!Platform.isLinux) {
Wakelock.enable();
}
}
@override
void onWindowMinimize() {
super.onWindowMinimize();
if (!Platform.isLinux) {
Wakelock.disable();
}
}
@override