Windows 10 virtual desktops and reconnecting after sleep

Advertisement

Ciantic
Joined:
Posts:
26
Location:
Finland

Windows 10 virtual desktops and reconnecting after sleep

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://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-ivirtualdesktopmanager

And here is a link to Russian forum with a unofficial APIs, which I can confirm works also:
<invalid hyperlink removed by admin>

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,442
Location:
Prague, Czechia

Re: Windows 10 virtual desktops and reconnecting after sleep

I do not think WinSCP activates a window during reconnect. Or what exactly do you mean by "activate"?

Reply with quote

Ciantic
Joined:
Posts:
26
Location:
Finland

Re: Windows 10 virtual desktops and reconnecting after sleep

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:
  • Disable flashing taskbar button from WinSCP

  • Get Windows 10 Virtual Desktop feature fixed so that it won't show flashing taskbar buttons on all desktops (unlikely Microsoft cares).

Reply with quote

martin
Site Admin
martin avatar

Re: Windows 10 virtual desktops and reconnecting after sleep

Yes, the "Disconnected" error message flashes the taskbar button. But it does that on purpose.

Reply with quote

Ciantic
Joined:
Posts:
26
Location:
Finland

Re: Windows 10 virtual desktops and reconnecting after sleep

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.

Reply with quote

Advertisement

Ciantic
Joined:
Posts:
26
Location:
Finland

Re: Windows 10 virtual desktops and reconnecting after sleep

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:
https://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.

Reply with quote

Advertisement

You can post new topics in this forum