'Last used window' would be a simpler algorithm - but still annoying if you actually want to get to an obscured window (wihich wasn't the last used).
'Last used window' would be a simpler algorithm - but still annoying if you actually want to get to an obscured window (wihich wasn't the last used).