Preface
After switching to Desktop screen via Super + D (or Ctrl + Alt + D), I want to switch to the previously opened window via Alt + Tab, however the Desktop is not counted as window, hence pressing Alt + Tab shows not the previous window, but the one opened before it.
Example
For instance, I have 2 windows opened ("1" and "2" in the order of opening) and window "2" is displayed. Then I switch to Desktop by pressing Super + D. While being on Desktop I press Alt + Tab, which switches me to the window "1", that is not the previous window (the previous one was "2", to which I expected to be switched).
Main question
What are the ways to make Alt + Tab switch to the previously opened window after switching to Desktop?
Partial solution
Alt + ` solves half of the problem: it does what I want if the application has only one window opened, with more it switches to the previous window of that application, but that behavior is unwanted.
1 Answer
No solution that I know of here. You would need to go into the code and change how Alt+Tab is designed, and/or how the desktop is handled. I also tend to answer even if to my knowledge the answer is negative. If there is another, better answer, it may still pop up here.
You can hit Super+D again to return to the window where you were before showing the desktop (a.k.a. hiding all windows). That unhides all windows again.
If you want to keep the other windows hidden, there is no other option than to summon Alt+Tab or Alt+` and first select that last window before releasing the keys.
The desktop indeed is not a window. When hiding all windows, your current window remains the active one. Alt+Tab is a windows or application switcher so when summoned, it will by default select the next window.