Revert "Revert "Revert "Fix up expanded desktop behaviour."""

This reverts commit ccb1673a369d28e0db5e174c48cab658473c5e40.
a fix for expanded desktop