VirtualDesktop
VirtualDesktop copied to clipboard
Last unfocused window in the target Virtual Desktop starts flashing after switching
If the last active window isn't in the target Virtual Desktop (the one we are switching to), the last window which had focus on the target Virtual Desktop starts flashing. This happened to me on version beta3.
Switching via Ctrl+Win+Arrow keys does not show the same behavior.
I am able to replicate this when running my application standalone, however when I run my application with debug from Visual Studio the flashing doesn't occur. Hopefully that'll help track down the cause of this, would love to see a fix or suggestions for a workaround. Thanks for the library!
@drzigman the library throws an exception telling to disable debug for me when I run it through VS.
To fix this bug you need to kill focus for all of the windows on the desktop that you are leaving before you switch desktops.
SendMessage(this.Handle, WindowsMessage.WM_KILLFOCUS, IntPtr.Zero, IntPtr.Zero);
I handle this in my app that you'll like a lot.
https://github.com/mzomparelli/zVirtualDesktop