not sure if that fits into this sub-forum, yet I haven't found a better place to ask.
A lot of employment contracts state that all IP (that implies source code, art assets etc.) created during the time of employment belongs to the company, thus even your spare time efforts. Some contracts state that you have to ask for permission to be allowed to even just start working on something in spare time. (means: no weekend game jams etc.).
I wonder, how is the legal state of this in various countries? I know there are some limitations to it in California, some countries even render those parts of contracts invalid, yet it's hard to google for it (or I just use wrong term?). Someone like Notch created his Minecraft as spare time project and it seems his employer never claimed rights for it. that makes me all wonder what's the state of spare time project IP in US states and European countries.
I'd be fully fine with just links to read the specific laws.