Skip to content

Commit

Permalink
Fix issue MR-538 - RDP loses connection when hiding config or connect…
Browse files Browse the repository at this point in the history
…ions pane
  • Loading branch information
rmcardle committed Sep 28, 2013
1 parent bc699a0 commit 270699c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Fixed issue MR-514 - Window Proxy test failed without close button
Fixed issue MR-521 - Right-Clicking in "Sessions" panel crashes mRemoteNG
Fixed issue MR-525 - Could not start on windows 7 64bit
Fixed issue MR-538 - RDP loses connection when hiding config or connections pane
Made minor improvements to the port scan functionality.

1.71 Beta 5 (2013-06-09):
Expand Down
11 changes: 10 additions & 1 deletion mRemoteV1/Connection/Connection.Protocol.RDP.vb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Namespace Connection
Private _rdpClient As MsRdpClient5NotSafeForScripting
Private _rdpVersion As Version
Private _connectionInfo As Info
Private _loginComplete As Boolean
#End Region

#Region "Public Methods"
Expand Down Expand Up @@ -131,7 +132,8 @@ Namespace Connection
End Function

Public Overrides Function Connect() As Boolean
Me.SetEventHandlers()
_loginComplete = False
SetEventHandlers()

Try
_rdpClient.Connect()
Expand Down Expand Up @@ -214,6 +216,8 @@ Namespace Connection
Private Sub ReconnectForResize()
If _rdpVersion < Versions.RDC80 Then Return

If Not _loginComplete Then Return

If Not InterfaceControl.Info.AutomaticResize Then Return

If Not (InterfaceControl.Info.Resolution = RDPResolutions.FitToWindow Or _
Expand Down Expand Up @@ -428,6 +432,7 @@ Namespace Connection
Try
AddHandler _rdpClient.OnConnecting, AddressOf RDPEvent_OnConnecting
AddHandler _rdpClient.OnConnected, AddressOf RDPEvent_OnConnected
AddHandler _rdpClient.OnLoginComplete, AddressOf RDPEvent_OnLoginComplete
AddHandler _rdpClient.OnFatalError, AddressOf RDPEvent_OnFatalError
AddHandler _rdpClient.OnDisconnected, AddressOf RDPEvent_OnDisconnected
AddHandler _rdpClient.OnLeaveFullScreenMode, AddressOf RDPEvent_OnLeaveFullscreenMode
Expand Down Expand Up @@ -469,6 +474,10 @@ Namespace Connection
Event_Connected(Me)
End Sub

Private Sub RDPEvent_OnLoginComplete()
_loginComplete = True
End Sub

Private Sub RDPEvent_OnLeaveFullscreenMode()
Fullscreen = False
RaiseEvent LeaveFullscreen(Me, New EventArgs())
Expand Down

0 comments on commit 270699c

Please sign in to comment.