So you are saying that if you set the mouse position relative to the window, it won't account for the window decoration?
If yes, then it is not an error but intended( and documented) behaviour.
If not, please provide a minimal example(and if possible a screenshot) which repoduces(/shows) the error.