New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getPosition reports incorrect (x,y) values in Linux #346

Closed
jarrettchisholm opened this Issue Jan 29, 2013 · 7 comments

Comments

Projects
None yet
3 participants
@jarrettchisholm

jarrettchisholm commented Jan 29, 2013

running on debian testing 64bit with proprietary nvidia driver.

calling getPosition() returns (10, 40) every time, no matter where I move the window to.

@jarrettchisholm

This comment has been minimized.

Show comment
Hide comment
@jarrettchisholm

jarrettchisholm Jan 29, 2013

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

https://gist.github.com/4666488

jarrettchisholm commented Jan 29, 2013

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

https://gist.github.com/4666488

@ghost ghost assigned LaurentGomila Jan 29, 2013

@jarrettchisholm

This comment has been minimized.

Show comment
Hide comment
@jarrettchisholm

jarrettchisholm Mar 30, 2013

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 :)

jarrettchisholm commented Mar 30, 2013

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 :)

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Mar 30, 2013

Member

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.

Member

LaurentGomila commented Mar 30, 2013

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.

@abodelot

This comment has been minimized.

Show comment
Hide comment
@abodelot

abodelot Mar 30, 2013

Contributor

I can confirm the bug, reproduced on the following systems:

  • Debian 32 bits / Nvidia NV43
  • Debian 64 bits / Intel mobile 4 chipset

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.

Contributor

abodelot commented Mar 30, 2013

I can confirm the bug, reproduced on the following systems:

  • Debian 32 bits / Nvidia NV43
  • Debian 64 bits / Intel mobile 4 chipset

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.

@jarrettchisholm

This comment has been minimized.

Show comment
Hide comment
@jarrettchisholm

jarrettchisholm Mar 30, 2013

@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.

Cheers

jarrettchisholm commented Mar 30, 2013

@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.

Cheers

@jarrettchisholm

This comment has been minimized.

Show comment
Hide comment
@jarrettchisholm

jarrettchisholm Mar 30, 2013

@abodelot made corrects you suggested - pull request is now pending.

jarrettchisholm commented Mar 30, 2013

@abodelot made corrects you suggested - pull request is now pending.

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila May 9, 2013

Member

Wouldn't XTranslateCoordinates do the same thing with just a single line of code?

Member

LaurentGomila commented May 9, 2013

Wouldn't XTranslateCoordinates do the same thing with just a single line of code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment