This is valid for 4.6.3. The problem is that after calling SmcOpenConnection session_client->client_id and session_client->given_client_id are compared, but the client_id is not updated to be given_client_id if they differ. Similarly, the client id should get replaced in the restart command if it differs from the one that's present.
Created attachment 2890 Patch to replace the client id in the commands if it changed
Do you have a test case that shows the need for that?
The need for this is bug 5123.
Brian could you take a quick look at this?
Hm, this bug might be invalid. I just tried to confirm my assumption by running 'xfdesktop --quit; xfdesktop --sm-client-id invalid', then save my session, and the restart command is correctly saved - even without this patch. Sorry about the fuss, and thanks for having a look Nick. Seems like the problem lies elsewhere.