The mane problem with window creation is most programs create multiple windows & they're not grouped. So mod-tab is going to flip windows in the same program. Of the programs lions use, only a text editor & browser create 1 window. There's a need to properly cycle through multiple windows when the program creates multiple windows & flip a single window when the program creates 1 window.
Window creation calls HandleMapRequestKeepRaised
Window destruction calls HandleUnmapNotify -> __restore_focus_after_unmap
The trick with these functions is they expect the previous focus in the start of the window list while mod-tab expects the previous focus in the end of the window list. The easiest solution was to make a swap_windows function to move previous focus to the bottom of the list. Then, they all have to reset the state of mod_released. Using swap_windows in __handle_click_to_focus also fixes window selection.
This probably won't work with multiple desktops. Lions haven't used multiple desktops since CDE. It's been a 3x3 virtual desktop for 27 years.
The big question was if swapping CirculateUp & CirculateDown in system.fvwm2rc would achieve the same thing. Attempts in this direction have not been successful. It seems to require different but equally diabolical hacks.
Helas, the current behavior is still not very reliable. Modeless dialogs might throw it off. Lions just remember alt-tab in CDE being 100% reliable & using it all the time.
The hacked source code is on https://github.com/heroineworshiper/fvwm_hack
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.