Without loging out and back in.
Useful for when desktop "freezes" or you have artifacts (see Macbook) and don't want to kill off background processes.
1. Open up term app
2. ps -aux|grep Graphics
3. Find the following:
windowse 52 0.9 5.6 915688 57592 ?? Ss 11:02AM 0:20.62 /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Resources/WindowServer -daemon
4. then HUP the found process:
sudo kill -HUP 52
52 is the process id tht I found. Yours will be different.
This will restart the GUI, logging you out, but at least you won't have to reboot the whole machine.