running on debian testing 64bit with proprietary nvidia driver.
calling getPosition() returns (10, 40) every time, no matter where I move the window to.
Fixed it - I used some older code from some cross-platform windowing code I had around (actually, I replaced it with SFML :)
patch file linked at bottom (gist repo).
File changed: src/SFML/Window/Linux/WindowImplX11.cpp
Any idea if this will be accepted into the release?
I have to patch sfml on each linux box I use for development, so I'm hoping it will be :)
Sorry, I won't have the time to process it before the release of SFML 2.0. You'll have to wait for at least SFML 2.1.
I can confirm the bug, reproduced on the following systems:
I also tested the patch supplied and it correctly fixes the bug.
@jarrettchisholm: You might want to correct the coding style: SFML uses 4 spaces for indentation and curly brackets are on a new line. Also a pull-request might be easier to integrate.
Good job anyway.
@LaurentGomila ok - I'm sure you have lots on your plate as it is. I guess I'll wait for 2.1.
@abodelot ahh, ok, I didn't even think about that - I'll fix it on Monday. I'll also see about doing the pull-request.
@abodelot made corrects you suggested - pull request is now pending.
Wouldn't XTranslateCoordinates do the same thing with just a single line of code?
Fixed Window::getPosition() on Linux (#346)