fix: linux, custom client, incoming, window size (#7995)

* fix: linux, custom client, incoming, window size

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* comments

Signed-off-by: fufesou <shuanglongchen@yeah.net>

---------

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2024-05-09 22:51:53 +08:00
committed by GitHub
parent a595d83232
commit 73662ed7d9
4 changed files with 13 additions and 5 deletions

View File

@@ -144,7 +144,12 @@ void runMainApp(bool startService) async {
}
windowManager.setOpacity(1);
windowManager.setTitle(getWindowName());
windowManager.setResizable(!bind.isIncomingOnly());
// `windowManager.setResizable(false)` will reset the window size to the default size on Linux.
// https://stackoverflow.com/questions/8193613/gtk-window-resize-disable-without-going-back-to-default
if (!isLinux) {
windowManager.setResizable(!bind.isIncomingOnly());
}
// For Linux, we set the edge size to 0 to disable resize. See `get windowEdgeSize` in common.dart.
});
}