Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/mRemoteNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitrij <kvarkas@gmail.com>2022-03-19 15:57:09 +0300
committerGitHub <noreply@github.com>2022-03-19 15:57:09 +0300
commit37fc611767aacfe7441d0e291e3024c5a35b0ec1 (patch)
tree56a6451cdef88fdfa9e43f878536beeac0040e06
parent85f7be1d79cc56793aa9d9341cac6af9ffe3e9fd (diff)
parentf95fe351e2148c57f98f05979118451782fda29b (diff)
Merge pull request #2188 from Trellmor/UpdateSessionDisplaySettings
Update session display settings
-rw-r--r--CHANGELOG.md2
-rw-r--r--mRemoteNG/Connection/Protocol/RDP/RdpProtocol8.cs25
-rw-r--r--mRemoteNG/Connection/Protocol/RDP/RdpProtocol9.cs39
-rw-r--r--mRemoteNGDocumentation/known_issues.rst3
-rw-r--r--mRemoteNGDocumentation/protocols/rdp.rst11
5 files changed, 53 insertions, 27 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2197a9c9..6e3d5444 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Added
- #2138: Improve compatibility with Remote Desktop Connection Manager v2.83
- #2123: Thycotic Secret Server - Added 2FA OTP support
+### Changed
+- #1546: Enable resize without reconnect for RDP Version Rdc9 or higher
## [1.77.2]
### Added
diff --git a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol8.cs b/mRemoteNG/Connection/Protocol/RDP/RdpProtocol8.cs
index c1cb1057..d3bf69f4 100644
--- a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol8.cs
+++ b/mRemoteNG/Connection/Protocol/RDP/RdpProtocol8.cs
@@ -29,7 +29,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
protected set
{
base.SmartSize = value;
- ReconnectForResize();
+ DoResizeClient();
}
}
@@ -39,7 +39,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
protected set
{
base.Fullscreen = value;
- ReconnectForResize();
+ DoResizeClient();
}
}
@@ -50,19 +50,19 @@ namespace mRemoteNG.Connection.Protocol.RDP
public override void Resize(object sender, EventArgs e)
{
- if (DoResize() && _controlBeginningSize.IsEmpty)
+ if (DoResizeControl() && _controlBeginningSize.IsEmpty)
{
- ReconnectForResize();
+ DoResizeClient();
}
base.Resize(sender, e);
}
public override void ResizeEnd(object sender, EventArgs e)
{
- DoResize();
+ DoResizeControl();
if (!(Control.Size == _controlBeginningSize))
{
- ReconnectForResize();
+ DoResizeClient();
}
_controlBeginningSize = Size.Empty;
}
@@ -72,7 +72,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
return new AxMsRdpClient8NotSafeForScripting();
}
- private void ReconnectForResize()
+ private void DoResizeClient()
{
if (!loginComplete)
return;
@@ -94,8 +94,8 @@ namespace mRemoteNG.Connection.Protocol.RDP
{
var size = Fullscreen
? Screen.FromControl(Control).Bounds.Size
- : Control.Size;
- RdpClient8.Reconnect((uint)size.Width, (uint)size.Height);
+ : Control.Size;
+ UpdateSessionDisplaySettings((uint)size.Width, (uint)size.Height);
}
catch (Exception ex)
{
@@ -106,7 +106,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
}
}
- private bool DoResize()
+ private bool DoResizeControl()
{
Control.Location = InterfaceControl.Location;
// kmscode - this doesn't look right to me. But I'm not aware of any functionality issues with this currently...
@@ -120,5 +120,10 @@ namespace mRemoteNG.Connection.Protocol.RDP
return false;
}
}
+
+ protected virtual void UpdateSessionDisplaySettings(uint width, uint height)
+ {
+ RdpClient8.Reconnect(width, height);
+ }
}
}
diff --git a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol9.cs b/mRemoteNG/Connection/Protocol/RDP/RdpProtocol9.cs
index 64923285..e0527d8b 100644
--- a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol9.cs
+++ b/mRemoteNG/Connection/Protocol/RDP/RdpProtocol9.cs
@@ -1,15 +1,24 @@
-using System.Windows.Forms;
-using AxMSTSCLib;
-
-namespace mRemoteNG.Connection.Protocol.RDP
-{
- public class RdpProtocol9 : RdpProtocol8
- {
- protected override RdpVersion RdpProtocolVersion => RdpVersion.Rdc9;
-
- protected override AxHost CreateActiveXRdpClientControl()
- {
- return new AxMsRdpClient9NotSafeForScripting();
- }
- }
-}
+using System.Windows.Forms;
+using AxMSTSCLib;
+using MSTSCLib;
+
+namespace mRemoteNG.Connection.Protocol.RDP
+{
+ public class RdpProtocol9 : RdpProtocol8
+ {
+ private MsRdpClient9NotSafeForScripting RdpClient9 =>
+ (MsRdpClient9NotSafeForScripting)((AxHost)Control).GetOcx();
+
+ protected override RdpVersion RdpProtocolVersion => RdpVersion.Rdc9;
+
+ protected override AxHost CreateActiveXRdpClientControl()
+ {
+ return new AxMsRdpClient9NotSafeForScripting();
+ }
+
+ protected override void UpdateSessionDisplaySettings(uint width, uint height)
+ {
+ RdpClient9.UpdateSessionDisplaySettings(width, height, width, height, 0, 1, 1);
+ }
+ }
+} \ No newline at end of file
diff --git a/mRemoteNGDocumentation/known_issues.rst b/mRemoteNGDocumentation/known_issues.rst
index e751758c..2a9f71a8 100644
--- a/mRemoteNGDocumentation/known_issues.rst
+++ b/mRemoteNGDocumentation/known_issues.rst
@@ -121,10 +121,11 @@ the following connection options are set:
To prevent reconnecting, you can do one of several things:
+- Change RDP Version to Rdc9 or higher. Rdc9 supports resolution changes without reconnecting.
- Change the resolution to Smart Size. This will scale the original connection area when the view window size changes. This does not preserve aspect ratio.
- Turn off Automatic Resize. When the view window size changes, you will see scroll bars or dead space.
-There is no way to update the view window size without a reconnect.
+There is no way to update the view window size without a reconnect in RDP Version lower than Rdc9.
This is an RDP protocol limitation.
AltGr key combinations stop working in other apps when connected to RDP
diff --git a/mRemoteNGDocumentation/protocols/rdp.rst b/mRemoteNGDocumentation/protocols/rdp.rst
index c8ad9cc6..69454d08 100644
--- a/mRemoteNGDocumentation/protocols/rdp.rst
+++ b/mRemoteNGDocumentation/protocols/rdp.rst
@@ -118,7 +118,16 @@ In RDP 8, support was improved for reconnecting RDP connections for resizing ope
RDP 9
-----
-We support this protocol version, but are not yet using any of its features.
+In RDP 9, support was further improved for reconnecting RDP connections for resizing operations.
+
+.. list-table::
+ :widths: 30 70
+ :header-rows: 1
+
+ * - Property
+ - Description
+ * - Automatic Resize
+ - When this property is enabled and ``Resolution`` is set to ``Fit to Panel`` and the connection window is resized, the RDP connection will automatically change the resolution without reconnecting.
RDP 10