Topic "Windows 10 virtual desktops and reconnecting after sleep"

Author Message
Ciantic
[View user's profile]

Joined: 2012-11-06
Posts: 21
Location: Finland
Hello!

When I resume my computer from sleep, all WinSCP windows jumps to the virtual desktop (Windows 10) I'm currently using.

This is because the WinSCP automatically reconnects, and reconnecting activates a window which causes Windows 10 virtual desktops to behave weirdly when on different desktop.

Here is official MSDN docs about few public Virtual Desktop API's:

https://msdn.microsoft.com/en-us/library/windows/desktop/mt186440%28v%3Dvs.85%29.aspx

And here is a link to Russian forum with a unofficial APIs, which I can confirm works also:
http://www.cyberforum.ru/blogs/105416/blog3671.html

Though I suspect you don't need to use any of these new APIs if it's enough to not activate the window when reconnecting.

Thanks, good work.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
I do not think WinSCP activates a window during reconnect. Or what exactly do you mean by "activate"?
Ciantic
[View user's profile]

Joined: 2012-11-06
Posts: 21
Location: Finland
prikryl wrote:
I do not think WinSCP activates a window during reconnect. Or what exactly do you mean by "activate"?


It flashes the task bar button when I resume from sleep, I'm not sure is it because of reconnect or some other thing.

But gist of it is that all WinSCP taskbar buttons appear on the desktop I woke the computer at, regardless were they in there or not. Other programs don't do that.

Edit I believe this is because of flashing taskbar button feature. Does WinSCP flash taskbar button when reconnecting? This causes the Windows 10 virtual desktop to show such windows on all desktops.

It happens sporadically on other apps too, if their taskbar button starts flashing they appear on all desktops. Options to fix this are:

1. Disable flashing taskbar button from WinSCP

2. Get Windows 10 Virtual Desktop feature fixed so that it won't show flashing taskbar buttons on all desktops (unlikely Microsoft cares).
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Yes, the "Disconnected" error message flashes the taskbar button. But it does that on purpose.
_________________
Martin Prikryl
Ciantic
[View user's profile]

Joined: 2012-11-06
Posts: 21
Location: Finland
prikryl wrote:
Yes, the "Disconnected" error message flashes the taskbar button. But it does that on purpose.


I noticed, would it be feasible to make it as an option?

E.g. in Environment -> Notifications section.

This was not a issue before, but now that FlashWindowEx has double meaning with Windows 10 it suddenly becomes a lot more problematic.

Windows 10 has virtual desktops and I don't find disconnecting so urgent matter I would want it to move WinSCP to virtual desktop I'm currently using if it disconnects.

Some sessions seems to be reconnecting automatically in other desktops and they keep popping up in other desktops because of this.

Thanks.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
OK, will consider this.

Did you try to enable keepalives to prevent the disconnects?
https://winscp.net/eng/docs/ui_login_connection
Ciantic
[View user's profile]

Joined: 2012-11-06
Posts: 21
Location: Finland
prikryl wrote:
OK, will consider this.

Did you try to enable keepalives to prevent the disconnects?
https://winscp.net/eng/docs/ui_login_connection


I now did set keep alive.

Though the problem is I have 8 virtual desktops, and approx. 4 running WinSCP in different desktops, and the fact they move even when I return from the sleep caused a lot of pain each time I resumed from sleep.

I actually got so frustrated by whole feature in Windows 10, I made a (in-memory) patch to running explorer.exe which disables whole flashing taskbar buttons -feature, if you are interested:
http://ciantic.blogspot.com/2015/10/in-memory-patching-explorerexe-to.html and my little script that patches explorer.exe is in GitHub: https://github.com/Ciantic/DisableFlashingTaskbarButtons

I think it's wrong that they gave FlashWindow api command a second meaning by showing it on all virtual desktops, they should've made a new API command for it.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Thanks for sharing this!
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License