Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rustdesk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李朝发
rustdesk
Commits
48481884
Commit
48481884
authored
Sep 05, 2022
by
21pages
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix closing PortForward page while closing msgbox
Signed-off-by:
21pages
<
pages21@163.com
>
parent
48998ded
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
common.dart
flutter/lib/common.dart
+13
-1
main.dart
flutter/lib/main.dart
+6
-0
No files found.
flutter/lib/common.dart
View file @
48481884
...
...
@@ -27,6 +27,7 @@ var isWeb = false;
var
isWebDesktop
=
false
;
var
version
=
""
;
int
androidVersion
=
0
;
late
final
DesktopType
?
desktopType
;
typedef
F
=
String
Function
(
String
);
typedef
FMethod
=
String
Function
(
String
,
dynamic
);
...
...
@@ -42,6 +43,15 @@ late final iconFile = MemoryImage(Uint8List.fromList(base64Decode(
late
final
iconRestart
=
MemoryImage
(
Uint8List
.
fromList
(
base64Decode
(
'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAB7BAAAewQHDaVRTAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAbhJREFUWIXVlrFqFGEUhb+7UYxaWCQKlrKKxaZSQVGDJih2tj6MD2DnMwiWvoAIRnENIpZiYxEro6IooiS7SPwsMgNLkk3mjmYmnmb45/73nMNwz/x/qH3gMu2gH6rAU+Blw+Lngau4jpmGxVF7qp1iPWjaQKnZ2WnXbuP/NqAeUPc3ZkA9XDwvqc+BVWCgPlJ7tRwUKThZce819b46VH+pfXVRXVO/q2cSul3VOgZUl0ejq86r39TXI8mqZKDuDEwCw3IREQvAbWAGmMsQZQ0sAl3gHPB1Q+0e8BuYzRDuy2yOiFVgaUxtRf0ETGc4syk4rc6PqU0Cx9j8Zf6dAeAK8Fi9sUXtFjABvEgxJlNwRP2svlNPjbw/q35U36oTFbnyMSwabxb/gB/qA3VBHagrauV7RW0DRfP1IvMlXqkXkhz1DYyQTKtHa/Z2VVMx3IiI+PI3/bCHjuOpFrSnAMpL6QfgTcMGesDx0kBr2BMzsNyi/vtQu8CJlgwsRbZDnWP90NkKaxHxJMOXMqAeAn5u0ydwMCKGY+qbkB3C2W3EKWoXk5zVoHbUZ+6Mh7tl4G4F8RJ3qvL+AfV3r5Vdpj70AAAAAElFTkSuQmCC'
)));
enum
DesktopType
{
main
,
remote
,
fileTransfer
,
cm
,
portForward
,
rdp
,
}
class
IconFont
{
static
const
_family1
=
'Tabbar'
;
static
const
_family2
=
'PeerSearchbar'
;
...
...
@@ -478,7 +488,9 @@ void msgBox(
submit
()
{
dialogManager
.
dismissAll
();
// https://github.com/fufesou/rustdesk/blob/5e9a31340b899822090a3731769ae79c6bf5f3e5/src/ui/common.tis#L263
if
(!
type
.
contains
(
"custom"
))
{
if
(!
type
.
contains
(
"custom"
)
&&
!(
desktopType
==
DesktopType
.
portForward
||
desktopType
==
DesktopType
.
rdp
))
{
closeConnection
();
}
}
...
...
flutter/lib/main.dart
View file @
48481884
...
...
@@ -43,12 +43,16 @@ Future<Null> main(List<String> args) async {
WindowType
wType
=
type
.
windowType
;
switch
(
wType
)
{
case
WindowType
.
RemoteDesktop
:
desktopType
=
DesktopType
.
remote
;
runRemoteScreen
(
argument
);
break
;
case
WindowType
.
FileTransfer
:
desktopType
=
DesktopType
.
fileTransfer
;
runFileTransferScreen
(
argument
);
break
;
case
WindowType
.
PortForward
:
desktopType
=
argument
[
'isRDP'
]
?
DesktopType
.
rdp
:
DesktopType
.
portForward
;
runPortForwardScreen
(
argument
);
break
;
default
:
...
...
@@ -56,9 +60,11 @@ Future<Null> main(List<String> args) async {
}
}
else
if
(
args
.
isNotEmpty
&&
args
.
first
==
'--cm'
)
{
print
(
"--cm started"
);
desktopType
=
DesktopType
.
cm
;
await
windowManager
.
ensureInitialized
();
runConnectionManagerScreen
();
}
else
{
desktopType
=
DesktopType
.
main
;
await
windowManager
.
ensureInitialized
();
windowManager
.
setPreventClose
(
true
);
runMainApp
(
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment