Preserve the desktop where an application's window was placed, after a system restart As the image below shows, I've a few applications which I keep open on my main desktop and I've another space/Desktop for applications like Twitter for Mac, Stickies, etc.



Now, the problem is that when I restart the system (I use the setting - "Reopen Windows when logging back in"), all the application windows which are opened on the Desktop 2 come up on the Desktop 1, instead of Desktop 2 where they were present originally. Is there a way to preserve their location after the restart?
Ok, I found a solution that's working for me, and now my application windows doesn't switch Desktop randomly on restart.

For the two desktop setup as in the question, first I go to the desktop where I want to stick an application window. Say, we want to stick web browser to desktop 1, we 


go to desktop 1, 
open the application on this desktop, 
right click on the application icon on the dock, then Options > Assign to > This desktop
similarly, stick applications on desktop 2


Now, after system restart, the applications are starting where they were sticked!