mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 14:07:46 +08:00
Merge pull request #2415 from BlueBlock/fix_window_restore_resize
Update RdpProtocol8.cs
This commit is contained in:
@@ -23,6 +23,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
private MsRdpClient8NotSafeForScripting RdpClient8 => (MsRdpClient8NotSafeForScripting)((AxHost)Control).GetOcx();
|
||||
|
||||
protected override RdpVersion RdpProtocolVersion => RDP.RdpVersion.Rdc8;
|
||||
protected FormWindowState LastWindowState = FormWindowState.Minimized;
|
||||
|
||||
public override bool Initialize()
|
||||
{
|
||||
@@ -57,7 +58,9 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
|
||||
protected override void Resize(object sender, EventArgs e)
|
||||
{
|
||||
if (_frmMain.PreviousWindowState == _frmMain.WindowState) return;
|
||||
if (LastWindowState == _frmMain.WindowState) return;
|
||||
LastWindowState = _frmMain.WindowState;
|
||||
if (_frmMain.WindowState == FormWindowState.Minimized) return; // don't resize when going to minimized since it seems to resize anyway, as seen when window is restored
|
||||
DoResizeControl();
|
||||
DoResizeClient();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user