> It looks reasonable, am just a bit unclear on exactly the problem case this is
> fixing. A test case would help me understand.
Without this the workspaces-example gets very confused when switching back to a workspace with multiple windows. So to see the problem you'd need to extract this code from that branch.
Under the hood, the mru list gets out of step with the Z order in the Mir "model" (as we don't guarantee to make windows visible in that order).
Medium term I think this logic needs to be better integrated with the Mir "model", but this papers over the cracks.
We need a lot more tests around the focus logic, I'm tempted to suggest leaving that for a follow-up branch.
> It looks reasonable, am just a bit unclear on exactly the problem case this is
> fixing. A test case would help me understand.
Without this the workspaces-example gets very confused when switching back to a workspace with multiple windows. So to see the problem you'd need to extract this code from that branch.
Under the hood, the mru list gets out of step with the Z order in the Mir "model" (as we don't guarantee to make windows visible in that order).
Medium term I think this logic needs to be better integrated with the Mir "model", but this papers over the cracks.
We need a lot more tests around the focus logic, I'm tempted to suggest leaving that for a follow-up branch.