Open EdwinVanRooij opened 3 years ago
Update:
For anyone else experiencing this bug, I have found a way to "deal" with it.
It's not a solution, but rather something to deal with it in most cases.
I added a check to the script, it checks whether I'm currently on the LastOpenedDesktop
. If I am, but I pressed the shortcut to switchDesktopToLastOpened()
, it will always move me to desktop number 1 (hard coded).
99% of the times I'm experiencing this bug, I want to go from some desktop where I got through messaging (which is usually at desktop 2), back to my working desktop (which is desktop 1).
I am experiencing this bug, any solution ?
I think switching desktop by clicking the notify icon of status bar is not recorded by switchDesktopByNumber, so it can not restore to last opened desktop.
I'm using the default key binding:
CapsLock & tab::switchDesktopToLastOpened()
.Steps to reproduce:
CapsLock & 2::switchDesktopByNumber(2)
CapsLock & 1::switchDesktopByNumber(1)
switchDesktopToLastOpened()
Now it's not hard to see what's happening here, the variable
LastOpenedDesktop
is only set in_switchDesktopToTarget
(LastOpenedDesktop := CurrentDesktop
). Because of this, any other way of moving to another desktop will not register into the variableLastOpenedDesktop
, thus leaving value2
inLastOpenedDesktop
, even though I'm currently at desktop 2 and 1 was my previous desktop.tl;dr: this program assumes it is in complete control over switching desktops, leading to broken functionality
I've thought about this for a while, but I haven't been able to come up with a clean solution.