Start a new topic

Putty cursor thinks it's not in focus

Not a "problem" per se, but:

Recently, the input cursor in my Putty session tabs has turned into an empty block, instead of a filled block, which normally indicates that the Putty window is not currently in focus.

However, it clearly is, I'm typing in it. ;-)

It changes to a filled block if I click my mouse inside the tab and stays that way for as long as I hold the mouse button, but as soon as I release the mouse button, the cursor returns to the empty block.


Is this related to the external application integration rewrite that was in 6.1?

I'm using version 6.1.50420.

ok.png
(12.9 KB)
notok.png
(13.9 KB)

Thanks for the confirmation!

Yep, definitely, I'm able to reproduce it with just PuTTY itself.

Hi Christian,


maybe the issue you have is related to PuTTY. You could try to run PuTTY directly to verify. I also checked our ticketing system and couldn't find any tickets in this area.


Regards,
Stefan

Hi,

I gave 6.01.50527 a try. Switching the embed method seems to work as intended without issues.
The copy & paste issue however persists, regardless of which method is used.
So... either this is a bug in PuTTY itself or I don't know. I've reproduced it all the way back to PuTTY 0.70. (And up to 0.77 which just came out, btw.)
It's possible I've only started noticing after switching from middle-click to paste to using right-click to paste a while ago, which I can do a bit faster, it seems.
Either way, unrelated to RoyalTS!

Hi!


I just finished rewriting the whole embed code for external apps (including PuTTY). To control the embed behavior for PuTTY, change the plugin setting to Window (old method) or Client Area (new method):


Window: Classic re-parenting method. May have ALT+TAB order and focus restore issues.

Client Area: Deeper integration with correct ALT+TAB order but PuTTY may appear inactive or unfocused.


For external application connections, a similar setting is available:


Note this release is not fully tested but I wanted you to have early access to do some tests. So if you see any issues, please let me know by opening a new support ticket including a reference to this build:

https://download.royalapps.com/RoyalTS/RoyalTSInstaller_6.01.50527.0.msi

https://download.royalapps.com/RoyalTS/RoyalTS_6.01.50527.0.zip

Never mind all those double-posts. I kept getting HTTP 500 / internal server error messages when trying to post my comment.

I do keep running into the issue where selection text is not copied into the clipboard automatically, causing me to paste the wrong (previous) content from time to time.
It seems to be a timing issue. If I double-click (to select) and then right-click (to paste) quickly enough (not really hard to do), I paste the previous selection. If I paste again (without making a new selection) just a second later, it will paste the newest selection instead.


I've added a video of it. I realize mouse clicks are not visible here. I double-clicked on node_modules and right-clicked to paste, pressed enter to move to a new line, then double-clicked on public, and right-click to paste (which pasted "node_modules"!), pressed enter to move to a new line, and again right-clicked (without first selecting anything new) and it pasted "public".


Should I open a separate thread for this, or a support ticket?
Or is this even a RoyalTS issue?
I can't find any mention of it in PuTTY's git repository. (I tried pasting a link here, but the forum throws an internal error of I do.)

webm

I do keep running into the issue where selection text is not copied into the clipboard automatically, causing me to paste the wrong (previous) content from time to time.
It seems to be a timing issue. If I double-click (to select) and then right-click (to paste) quickly enough (not really hard to do), I paste the previous selection. If I paste again (without making a new selection) just a second later, it will paste the newest selection instead.


I've added a video of it. I realize mouse clicks are not visible here. I double-clicked on node_modules and right-clicked to paste, pressed enter to move to a new line, then double-clicked on public, and right-click to paste (which pasted "node_modules"!), pressed enter to move to a new line, and again right-clicked (without first selecting anything new) and it pasted "public".


Should I open a separate thread for this, or a support ticket?
Or is this even a RoyalTS issue?
I can't find any mention of it here, at least: https://git.tartarus.org/?p=simon%2Fputty.git&a=search&h=HEAD&st=commit&s=clip

webm

Hi Michael,


we are working on a solution where you can switch between the two implementations and hope to provide a stable system for window embedding with little side effects. One side effect we still haven't found a solution yet is the wrong ALT-TAB order. It's also hard to restore the keyboard focus when returning to Royal TS from another app using ALT-TAB and PuTTY had the input focus.


We are also working on "open-sourcing" the solution so that everyone can see how it's done.


Regards,
Stefan


1 person likes this

can you please fix the empty block cursor problem in putty? it is ultimately disturbing!

i understand that it is a side effect related to the re-parenting of the external window. but in v5.2.6 everything works find and i can't see any difference regarding the windows.

that sounds like an excuse to me

The only oddity regarding copy & pasting that I have noticed is that some times highlighted text does not seem to be automatically copied to the clipboard, even when Putty is configured to do so.

(Window > Selection > "Auto-copy selected text to system clipboard").


Not sure if that's related to this, a bug in Putty, or just a bad mouse. :P

Thanks for the explanation and taking the time to test. Appreciate the quick response.

Hi Steven,


right-click paste works fine for me - even though the cursor is behaving as it has not the focus.


I also tried copy paste between two PuTTY sessions (see attached video). I copy some text from vi to the clipboard (mouse selection and CTRL+C), you can see that I have it on windows in notepad as well, then I pasted the copied text to the other PuTTY session using the right mouse button.


The issue that the PuTTY window is briefly visible is fixed for the next release.


Your experience where you are unable to restore/maximize other apps in front of Royal TS seems very strange. Not sure what could cause such an issue. I haven't seen this myself. Maybe there's some other tool interfering on your system? Embedding external applications is not really a supported scenario in Windows (see https://devblogs.microsoft.com/oldnewthing/20130412-00/?p=4683). This is kind of a hack and there's a good chance that other tools may do stuff which interferes here.


In general, the "new way" we do application embedding is a much cleaner and better way than the previous solution we had. I don't want to get too technical but the previous version may work well for you but other users had all kind of issues related to input focus. There were a lot of hacks in place and we needed to process a lot of system messages to make it work. This impacted performance, alt-tab order issues, unexpected focus grabbing issues, etc. It was a very fragile construct with lots of edge cases which caused all sorts of issues. I understand that the incorrect cursor display is an issue but it's a mystery to me why PuTTY is behaving this way. Every other application we embed doesn't show this behavior and I'm not sure if there's anything on our side we can do to improve it.


Regards,

Stefan 

mp4

Thanks for the feedback, Steven. I will look into those issues. In the meantime you can go back to the previous releases here: https://support.royalapps.com/support/solutions/articles/17000113666-royal-ts-v6-previous-versions

I'm unable to right-click in a Linux/putty-based console and paste whatever I have on the clipboard. It appears to be because, as the OP suggested, because the putty cursor is not currently in focus.


I also can't, for example, if I have a config file open in vi, highlight text with the cursor, and paste it into another putty-based session within Royal.


I have also experienced a couple of times, where I am unable to restore or maximise other applications in front of the Royal window. I need to quit Royal and restart before it's fixed.


When I start a putty-based session for any of my *nix servers, it starts Putty in a separate, detached window, then snaps it full-screen inside the Royal window.


All this behaviour has only started after the update.


Is there a way to download the previous version?


Thanks

Login or Signup to post a comment