how to forbid the view to be redrawed triggered by mouse in glut?

I do not want the view to be redrawed after a mouse click in the window or window size change,how to let "glutDisplayFunc()"ignore the mouse action? I want the redraw to be controled only by program code. Can you slove the problem in glut?or please give me some other advice.
thanks!

I think you do not need a redraw callback at all, if you want to call it explicitly.

Here is other option:
Do not call glutPostRedisplay() in your mouse callback.

And do not reset viewport and projection matrix in your reshape callback. Just set your global variable(bool) in order to know when the window is resized. Then, you can change the viewport later when you need to.

but if you resize and dont redraw you get the same image in a bigger window, you need to make a hack for this? as in

– if resize (when dont want redraw) dont redraw
?