fix: macos fullscreen state (#8110)

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2024-05-21 23:38:27 +08:00 committed by GitHub
parent 534fc9c40c
commit 1acd7bd19c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -209,6 +209,22 @@ class _RemotePageState extends State<RemotePage>
}
}
@override
void onWindowEnterFullScreen() {
super.onWindowEnterFullScreen();
if (isMacOS) {
stateGlobal.setFullscreen(true);
}
}
@override
void onWindowLeaveFullScreen() {
super.onWindowLeaveFullScreen();
if (isMacOS) {
stateGlobal.setFullscreen(false);
}
}
@override
Future<void> dispose() async {
final closeSession = closeSessionOnDispose.remove(widget.id) ?? true;