port (almost ok) old glfw proto to wx