Check that region list isn't empty before attempting to retrieve a region from it
Set window role for Mir backend
Merge pull request #1 from Elleo/master

Set the Mir window role and discard empty region lists