Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Added mouse position for button handling
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 12, 2009
1 parent 16471e0 commit a272422
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/testwm.c
Expand Up @@ -214,9 +214,10 @@ FilterEvents(void *userdata, SDL_Event * event)
visible = !visible;
SDL_ShowCursor(visible);
}
printf("Mouse button %d has been %s\n",
printf("Mouse button %d has been %s at %d,%d\n",
event->button.button,
(event->button.state == SDL_PRESSED) ? "pressed" : "released");
(event->button.state == SDL_PRESSED) ? "pressed" : "released",
event->button.x, event->button.y);
return (0);

/* Show relative mouse motion */
Expand Down

0 comments on commit a272422

Please sign in to comment.