kivison / superputty

Automatically exported from code.google.com/p/superputty
MIT License
0 stars 0 forks source link

Sometimes the putty window isn't attached #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I do not know what caused the problem, but in my PC the PUTTY window is not 
attached into the SuperPutty.

I found the problem, with a few lines of code it was corrected.

In SuperPutty::ApplicationPanel::OnVisibleChanged, the WaitForInputIdle() 
wasn't making the thread to sleep, so the m_AppWin was with 0. I solved 
with a WOP, but it works. The patch follows:

1152,1153c1152,1157
<                     m_Process.WaitForInputIdle();                    
<                     m_AppWin = m_Process.MainWindowHandle;                   

---
>                     m_AppWin = m_Process.MainWindowHandle;
>                     while (IntPtr.Zero == m_AppWin)
>                     {
>                         System.Threading.Thread.Sleep(100);
>                         m_AppWin = m_Process.MainWindowHandle;
>                     }

Best Regards,
Yuri Ivatchkovitch
http://sites.google.com/site/holycaffeine/

Original issue reported on code.google.com by mytos.m...@gmail.com on 28 May 2010 at 2:12

GoogleCodeExporter commented 9 years ago
Issue 55 has been merged into this issue.

Original comment by btatey...@gmail.com on 19 Apr 2012 at 12:28

GoogleCodeExporter commented 9 years ago
Fix in issue 92 seems to resolve these problems.  

uses this approach as well as a few other fixes

Original comment by btatey...@gmail.com on 28 May 2012 at 9:46