get mouse location on screen
===

I have the code below for getting mouse location on screen:

        NSPoint loc = [NSEvent mouseLocation];
        NSLog(@"x:%.2f y:%.2f",loc.x, loc.y);

When I clicked on my app window i set an action, where I can track this action.
But, to my surprise it gives more or less same value wherever i clicked on the window. I move window at different location on screen though.

The result are as under:


2012-07-31 12:50:08.740 MyApp[2860:d03] x:432.19 y:450.07 (when window is on top section of screen)
2012-07-31 12:50:19.042 MyApp[2860:d03] x:435.14 y:453.16 (when window is on bottom section of screen)
