Would this rightly be considered a bug?
I did not remember this behaviour in Leopard but I'm not sure.
Anyway this is what happens in Lion currently 10.7.4
Say you have 3 apps, each one locked to it's own desktop by using the option found when holding the icon for the app in the Dock where you have the opportunity to select "Assign to this Desktop"
OK so we have for example Mail, Safari and Quicktime locked respectively to Desktops 1, 2 and 3.
I will use in this demonstration two different ways to switch application. One by clicking on the Dock and the other is using the Cmd + Tab shortcut. I also note that using the Cmd + Tab shortcut repeatedly will keep toggling back and forth between two apps which is a particularly handing feature that is ruined by this particular bug I'm about to describe.
First the Dock behaviour. I'm watching a movie on Desktop 3 and I hear that an email has been received. I hit the spacebar to stop the movie and click the mail icon in the Dock, OR I press Cmd + Tab which has the same effect. Either method will switch the focus to the Mail app (I'm assuming that the last app used was Mail).
In my opinion if the 'Assign to this Desktop' is working correctly (or was working as what would be it's common sense obviously expected default behaviour) then at the same time that either of the above two methods switches focus from Quicktime to Mail, the Desktop should also switch from Desktop 3 to Desktop 1.
The reason I think it is a bug is that the Dock is not meant to have to be double clicked on. It's meant to operate as a button, just like the Launcher app in OS 9 (or the Actions in Photoshop for that matter, when they are being used in 'button mode')
It appears to be a bug because there is no conceivable reason to switch focus without switching to the correct Desktop. If it were not possible to assign an app to a particular Desktop then this is the behaviour I would expect because there could be instances of open windows on the particular app you switch to on different desktops.
Apple has allowed the possibility to lock an app to it's own desktop and it is particular this ability that makes the point of Spaces in Mission Control useful.
If the Dock is used to switch applications then one has to click the Dock icont TWICE. The first time changes focus and the second one switches to the correct Desktop. This is the main reason that I think this is a bug because it does switch Desktop on the second click, so it has been designed with that behaviour in mind, so if that is the case there is no reason that it did not switch desktops on the first click when it switched the focus.
If the Cmd + Tab is used then once you have switched focus there's nothing more to do other then click the Dock. Therefore Cmd + Tab becomes redundant.
I also think it is a bug because in Leopard when using the Cmd + Toggle shortcut to toggle back and forth between two apps on their own desktops the Cmd + Tab shortcut would toggle the focus and switch the desktops in one go.
I've sent a bug report to Apple but I dont' know if they are even going to bother.
I am astounded that this behaviour has not been noticed because it flies in the face of normal apple guidlines regarding human behaviour and how the interface works.
iMac (27-inch Mid 2011), Mac OS X (10.7.3)