The input routine handles X events for the drawing area. Input events require no special handling for OpenGL. But remember that the coordinate systems for X and OpenGL are distinct, so pointer locations need to be mapped into OpenGL's coordinate space. OpenGL generally assumes that the origin is in the lower left-hand corner, while X always assumes an origin at the upper left-hand corner.