Get mouse position relative to window

"Phufhi" <[email protected]>
Newsgroups gmane.comp.lib.sdl
Message-ID <[email protected]>
I was wondering why SDL2 does not have a function to get the mouse position relative to a given window.
Other functions regarding the mouse like SDL_WarpMouseInWindow allow you to specify a window, while SDL_GetMouseState only works relative to the focus window (this seems inconsistent to me).
Even though I do know how to calculate the relative position using SDL_GetGlobalMouseState, I am curious about any specific reason behind the absence of the function in question.
Furthermore, alternative window/input libraries such as glfw and sfml do have this functionality. 
Is the SDL_GetGlobalMouseState solution as efficient as their implementations?
Thanks in advance.

_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.