I've seen this question asked multiple times here, and I tried some answers, but it doesn't seem to work for me.
NSPoint pnt = [[self window] convertScreenToBase:[NSEvent mouseLocation]];
I'm using above code to do my conversion, but I get same coordinates for pnt.x and pnt.y no matter where mouse location is.
I noticed that this method is deprecated, but it should still work I guess, right?
Does anyone have any good suggestion on how I can do this conversion?
Any kind of help is highly appreciated!