MATLAB, 41 bytes
function x=g(f,x);while f(x)-x;x=f(x);end
There is also this beauty that does not need function files. Unfortunately it is a little bit longer:
g=@i=@(gp,c)@c{2-p}();g=@(g,f,x)i(f(x)==x,{@()x,@()g(g)(,f,y)}{2-(y=ff(x)==x)});q=@(f,x);gg(g,f,x)