Found a bug and solution {Desktop.Destroy }
Brought to you by:
charliepoole,
lukemaxon
I ran into a problem with Destroy method in Desktop.cs
Original:
private void Destroy()
{
Win32.SetThreadDesktop(realDesktopHandle);
Switch(shouldDisplayDesktop);
Win32.CloseDesktop(testDesktopHandle);
}
Switch(shouldDisplayDesktop) calls : Win32.SwitchDesktop(CurrentHandle()) where currentHandle returns nunit that is running on the 'Main Desktop' and that way the virtual/hidden desktop never gets destroyed.
Modified:
private void Destroy()
{
Win32.SetThreadDesktop(realDesktopHandle);
Switch(realDesktopHandle); //pass it top desktop pointer so that the switch will happen
Win32.CloseDesktop(testDesktopHandle);
}
Thanks,
Rajesh Cheedalla
rajesh dot cheedalla AT google mail