Hello! I tried a patch that implements stack-based window switching. This works pretty much as I would expect, except for one thing. ctwm does not update the stack when a window receives focus. I made some changes to the attached patch. Could you review it and let me know what you think? This updates the stack when the window gets focus and makes ctwm more usable (from my point of view). -- Vitaly
--- win_ops.c 2022-07-27 01:32:19.065034575 +0500 +++ win_ops.c 2022-07-27 01:32:24.537034698 +0500 @@ -18,6 +18,7 @@ #include "win_iconify.h" #include "win_ops.h" #include "win_utils.h" +#include "win_ring.h" /* @@ -103,6 +104,11 @@ if(tmp_win->iconmanagerlist) { NotActiveIconManager(tmp_win->iconmanagerlist); } + + UnlinkWindowFromRing(tmp_win); + AddWindowToRingUnchecked(tmp_win, Scr->StackLeader->ring.prev); + Scr->RingLeader = tmp_win; + Scr->StackLeader = NULL; } if(Scr->use3Dtitles && Scr->SunkFocusWindowTitle && tmp_win->title_height) { ButtonState bs;