This project has moved and is read-only. For the latest updates, please go here.

RDP connection / AutoScale behavior

Topics: Developer Forum
Sep 2, 2015 at 10:59 AM
I would like to enhance the auto scale option in RDP connections.
Currently, if I configure a favorite to use e.g. 1920x1080 pixels but my Terminals window is e.g. only 800x600 pixels, the connection comes up with 800x600 pixels, even if I use "Auto Scale".

I suggest a cange in "\Terminals\Main\Source\Terminals\Connections\Rdp\RDPConnection.cs":
It is only a two-liner (below the comment).

public override void ChangeDesktopSize(DesktopSize desktopSize)
{
Size size = DesktopSizeCalculator.GetSize(this, this.Favorite);

try
{
    switch (desktopSize)
    {
        case DesktopSize.AutoScale:
        case DesktopSize.FitToWindow:
            this.client.AdvancedSettings3.SmartSizing = true;
            //Force desired resolution when auto scaling is on:
            size.Width = this.Favorite.Display.Width;
            size.Height = this.Favorite.Display.Height;
            break;
        case DesktopSize.FullScreen:
            this.client.FullScreen = true;
            break;
    }

    this.client.DesktopWidth = size.Width;
    this.client.DesktopHeight = size.Height;
}
catch (Exception exc)
{
    Logging.Error("Error trying to set the desktop dimensions", exc);
}
}