fix: linux, custom client, incoming only, resizable (#8005)

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2024-05-10 16:40:29 +08:00
committed by GitHub
parent 6e78037770
commit 69b11e8dc6
5 changed files with 39 additions and 19 deletions

View File

@@ -144,12 +144,8 @@ void runMainApp(bool startService) async {
}
windowManager.setOpacity(1);
windowManager.setTitle(getWindowName());
// `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.
// Do not use `windowManager.setResizable()` here.
setResizable(!bind.isIncomingOnly());
});
}
@@ -243,7 +239,7 @@ void runConnectionManagerScreen() async {
} else {
await showCmWindow(isStartup: true);
}
windowManager.setResizable(false);
setResizable(false);
// Start the uni links handler and redirect links to Native, not for Flutter.
listenUniLinks(handleByFlutter: false);
}