It is because of this:
glutIdleFunc(display);
display() is being called continuously, since you have registered it as the idle callback. The window does move. The problem is there are too many idle calls. Give some delay, that will work.
PS: Its not a good idea to register the display as the idle callback itself. In your case, this could be a better approach:
void idleCallback(void) { glutPostRedisplay(); // delay would be required. }
or you can perhaps you can have look at THIS as well.
This was it, add a sleep/delay there. cant believe it was that simple, thanks.