mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-09-11 19:17:43 +03: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 {
|
Future<void> onWindowMaximize() async {
|
||||||
super.onWindowMaximize();
|
super.onWindowMaximize();
|
||||||
await windowSizeManager.setWindowMaximized(true);
|
await windowSizeManager.setWindowMaximized(true);
|
||||||
|
await windowSizeManager.setPosition(Offset.zero);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> onWindowUnmaximize() async {
|
Future<void> onWindowUnmaximize() async {
|
||||||
super.onWindowUnmaximize();
|
super.onWindowUnmaximize();
|
||||||
await windowSizeManager.setWindowMaximized(false);
|
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
|
@override
|
||||||
|
Loading…
Reference in New Issue
Block a user