I type the same code as David, yet I get an unused window error and he doesn't. My code follows, and you can just as easily compare with his.
#include <spl/gevents.h>
#include <spl/gwindow.h>
int main(void)
{
GWindow window = newGWindow(320, 240);
while (true)
{
GEvent event = getNextEvent(MOUSE_EVENT);
if (event != NULL)
{
if (getEventType(event) == MOUSE_CLICKED)
{
printf("%.0f, %.0f", getX(event), getY(event));
}
}
}
}