SmartPutty icon indicating copy to clipboard operation
SmartPutty copied to clipboard

Black Putty screen doeesn't get focus when mouse clicks on it

Open crisistotal2014 opened this issue 7 years ago • 6 comments

Hi Eric! I've detected that black Putty screen doeesn't get focus when mouse clicks on it. To put on foreground is needed to click on main SmartPutty window. Nowaday Putty screen gets focus.

Is there some way to read Putty events a make SmartPutty on foreground?

Thanks!

crisistotal2014 avatar Jan 02 '18 10:01 crisistotal2014

Hi Carlos, Which system are you using ? I tested on Win7 and Win10 the black Putty window is in foreground when open session . If that's a bug, please try to fix it by searching setWindowFocus(hwnd) method in code.

setWindowFocus is used to activate window to be foreground, it works in win7 win10. Not sure if other system has problem.

ericmore avatar Jan 04 '18 02:01 ericmore

I'm using Windows 7 Enterprise 64 bits. Yes, when you open a session Putty window is in foreground, but when you change to another Windows programs and click on Putty window, it doesn't get to foreground (but cursor yes): is needed to click on Java main window to see full SmartPutty window.

crisistotal2014 avatar Jan 04 '18 08:01 crisistotal2014

Actually, this is by design. Putty Window is independent from the MainSmartPutty Window. Switching between SmartPutty and other windows program will randomly active either the input box in the MainGUI or PuTTY cursor.

That's the limitation end user must click Putty first before he can type command. But for most of the case I will active putty window to be foreground by default. Especially switch tabs inside SmartPutty.

ericmore avatar Jan 06 '18 08:01 ericmore

:-( Thanks for you detailed explanation Eric!

Perhaps, "SuperPutty" is able to do this switch betweeen windows . I'll try to find a solution.

crisistotal2014 avatar Jan 08 '18 08:01 crisistotal2014

I was going to log the same "defect" until I saw this. I agree this is quite annoying and would love to see a solution. I'm not sure how other similar programs do it, such as MTPutty and mRemoteNG -which is open source so maybe you could study their code, though I think it's .NET, not Java.

msmigiel avatar Feb 22 '18 17:02 msmigiel

Good idea MsMigiel! Thanks!

crisistotal2014 avatar Feb 23 '18 06:02 crisistotal2014