Open PhilipNelson5 opened 1 year ago
@PhilipNelson5 Yeah, we've had this issue crop up before: https://github.com/widavies/WinJump/issues/21
It seems to be quite variable - sometimes it works, sometimes it doesn't. When I have some time I'll experiment with a few methods. It seems to be dependent on the Windows version, some handle the focus shift better than others.
What Windows version are you on?
Version 21H2 OS Build 22000.2538
@PhilipNelson5 Any better luck on a more recent update of Windows 11?
@PhilipNelson5 Try on the latest pre-release here and let me know if it works.
I'm on 2.0.7, 2.0.8 and 2.0.9 immediately crash. Is there a good way to get logs? The terminal that spawns does not stay open long enough to read the output.
@PhilipNelson5 If you open Windows Event Viewer and go to the Application section, you should be able to see a Error message for WinJump:
@PhilipNelson5 See if 2.0.10 fixes the crashing: https://github.com/widavies/WinJump/releases/tag/2.0.10
@PhilipNelson5 Is it still crashing? Did you get it to work?
I actually changed jobs and got a new laptop and haven't been using winjump lately. When I get it setup again I'll keep an eye on it.
I've been experiencing this behavior as well where switching virtual desktops does not set focus to the previously focused window on the destination desktop.
In addition to the focus issue, every time I switch desktops, I notice a "Program Manager" window appears quickly during the switch.
I'm working on a way to resolve both issues.
Running Windows 11 Version 23H2 (OS Build 22631.4037)
https://github.com/user-attachments/assets/3eed0f21-7e5b-489b-bca8-a455008eae24
After spending some more time testing it seems this behavior is not consistent and likely caused by something else in my setup. I'm leaving this for now, but will return to it if others report it.
@justin-horner I've had the same trouble trying to track down this issue. It's very intermittent and seemingly depends on the specific Windows version and environment, or even time of day.
The Program Manager flashing is a trick I've seen suggested by VirtualDesktop where by passing focus to the program manager, it will pass it back to the active window after the virtual desktop switches. In practice, it doesn't seem to work very well so we could try removing it.
Maybe there's something else in the winuser.h API that we could use, otherwise we will have to wait for Microsoft to make their (internal) Virtual Desktop API not hit this bug.
When changing desktops, the focused window remains on the last focused window on the desktop I just left. I'd expect it to change focus to the last window that had focus before I left the desktop to which I'm returning. Basically, every virtual desktop has a "focused window" which regains focus when that desktop is the active desktop. I've been using 1.4.0 for a while and just upgraded to 2.0.7 but I still see this issue. I see there is a focus-fixes branch, is this issue something you are already tracking?