mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: macos fullscreen window position (#5632)
This commit is contained in:
parent
f812040f04
commit
7859fc7922
@ -85,12 +85,32 @@ class InitAppWindowTask extends LaunchTask with WindowListener {
|
||||
Future<void> onWindowMaximize() async {
|
||||
super.onWindowMaximize();
|
||||
await windowSizeManager.setWindowMaximized(true);
|
||||
await windowSizeManager.setPosition(Offset.zero);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> onWindowUnmaximize() async {
|
||||
super.onWindowUnmaximize();
|
||||
await windowSizeManager.setWindowMaximized(false);
|
||||
|
||||
final position = await windowManager.getPosition();
|
||||
return windowSizeManager.setPosition(position);
|
||||
}
|
||||
|
||||
@override
|
||||
void onWindowEnterFullScreen() async {
|
||||
super.onWindowEnterFullScreen();
|
||||
await windowSizeManager.setWindowMaximized(true);
|
||||
await windowSizeManager.setPosition(Offset.zero);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> onWindowLeaveFullScreen() async {
|
||||
super.onWindowLeaveFullScreen();
|
||||
await windowSizeManager.setWindowMaximized(false);
|
||||
|
||||
final position = await windowManager.getPosition();
|
||||
return windowSizeManager.setPosition(position);
|
||||
}
|
||||
|
||||
@override
|
||||
|
Loading…
Reference in New Issue
Block a user