opt: use WindowOption to initialize screen
Signed-off-by: Kingtous <kingtous@qq.com>
This commit is contained in:
parent
eed87808e5
commit
9fee1f41e7
@ -117,12 +117,23 @@ void runFileTransferScreen(Map<String, dynamic> argument) async {
|
||||
}
|
||||
|
||||
void runConnectionManagerScreen() async {
|
||||
// initialize window
|
||||
WindowOptions windowOptions = WindowOptions(
|
||||
size: Size(300, 400),
|
||||
center: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
skipTaskbar: false,
|
||||
titleBarStyle: TitleBarStyle.normal,
|
||||
);
|
||||
await Future.wait([
|
||||
initEnv(kAppTypeConnectionManager),
|
||||
windowManager
|
||||
.setSize(Size(300, 400))
|
||||
.then((value) => windowManager.setAlignment(Alignment.topRight))
|
||||
windowManager.waitUntilReadyToShow(windowOptions, () async {
|
||||
await windowManager.setAlignment(Alignment.topRight);
|
||||
await windowManager.show();
|
||||
await windowManager.focus();
|
||||
})
|
||||
]);
|
||||
;
|
||||
runApp(GetMaterialApp(theme: getCurrentTheme(), home: DesktopServerPage()));
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include "my_application.h"
|
||||
|
||||
#include <flutter_linux/flutter_linux.h>
|
||||
// #include <bitsdojo_window_linux/bitsdojo_window_plugin.h>
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
#include <gdk/gdkx.h>
|
||||
#endif
|
||||
@ -48,8 +47,8 @@ static void my_application_activate(GApplication* application) {
|
||||
gtk_window_set_title(window, "rustdesk");
|
||||
}
|
||||
|
||||
// auto bdw = bitsdojo_window_from(window); // <--- add this line
|
||||
// bdw->setCustomFrame(true); // <-- add this line
|
||||
// auto bdw = bitsdojo_window_from(window); // <--- add this line
|
||||
// bdw->setCustomFrame(true); // <-- add this line
|
||||
gtk_window_set_default_size(window, 1280, 720); // <-- comment this line
|
||||
gtk_widget_show(GTK_WIDGET(window));
|
||||
|
||||
|
@ -66,7 +66,6 @@ dependencies:
|
||||
git:
|
||||
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
|
||||
ref: 2b1176d53f195cc55e8d37151bb3d9f6bd52fad3
|
||||
# bitsdojo_window: ^0.1.2
|
||||
freezed_annotation: ^2.0.3
|
||||
tray_manager: 0.1.7
|
||||
get: ^4.6.5
|
||||
|
Loading…
x
Reference in New Issue
Block a user