To show a last active task in my Application Title Bar widget I have to set order to Last Activated, check the top row in the model and handle the Show Desktop state. This workaround works well with multi-display setups to keep widget active when the other display is used.
I think it could be integrated into TasksModel and used in other widgets, including Global Menu.
What do you think?