Added mouse position for button handling
authorSam Lantinga <slouken@libsdl.org>
Sat, 12 Dec 2009 00:08:02 +0000
changeset 3545 6d91cff0ec79
parent 3544 71189305cd33
child 3546 65848493e08e
Added mouse position for button handling
test/testwm.c
--- a/test/testwm.c	Sat Dec 12 00:07:26 2009 +0000
+++ b/test/testwm.c	Sat Dec 12 00:08:02 2009 +0000
@@ -214,9 +214,10 @@
             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 */