Often, I stumble upon some small compiz bug or corruption in the screenoutput. when that happens I run
unity --replace from a vty.
That fixes it, but reloading unity in this way makes the global menu bar disappear (every window thus gets its own menu bar) as well as the system tray (the one with date, sound, system menus).
I guess that telling them through dbus to connect to the new unity process might work, or alternatively kill and restart their processes.
I just discovered that I can get back the system tray/panel by launching
/usr/lib/unity/unity-panel-service (I wonder why this isn't restarted by
unity --replace), but this still leaves the global menu missing.