Menu

#15 Found a bug and solution {Desktop.Destroy }

open
nobody
None
5
2008-05-30
2008-05-30
No

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

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.