added support for the "magic margin", changed c.hide to c.state, changed xcursor...