-
Notifications
You must be signed in to change notification settings - Fork 206
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
One doc improvement, two bugfixes #121
base: master
Are you sure you want to change the base?
Conversation
I see you found another possible output of XRandR. Just out of pure curiosity: Do you have a full output somewhere? And what distribution + desktop environment + video card (driver) produces this? The XRandR patch looks fine, btw. |
Actually, my xorg.conf »produces« this:
But it is some kind of semi-standard to encode frequency values like so (funny side note: That modeline results in 59.95 Hz not in 50.00 - probably a typo, should have been 60.00). For some reasons, the default "1920x1200" mode didn't work out for me out of the box, that's why I did add that ModeLine in an trial and error approach some time ago. Anyways, that's why I couldn't just call it "1920x1200" also. Anyways, the underlaying problem is not doing the parsing the output of xrandr wrong (using -q --verbose, one can still find the width and height values from the modeline, see below), but conceptually to try parsing output of such a program in the first place. The output was designed to be consumed by humans, not scripts or java code ;). So the real solution is to create a jni for libxrandr and get the values from the structures directly. I'm not firm in jni, so I didn't just do that, yet.
=> The values behind width and height are the pixel counts. Those values will always be "correct". |
"So the real solution is to create a jni for libxrandr and get the values from the structures directly" Yes. However, this is non-trivial either. Older versions of LWJGL did that and the results obtained were just wrong. There is a longer explanation in one of the older tickets about this that shows why simply calling libxrandr will always produce incorrect values for certain multi-monitor setups - this is why the command line utility is used for most stuff now. (It is obviously possible to get the correct numbers from libxrandr somehow, since the command line utility uses it and displays correct values.) However, with LWJGL 3 incoming it was just simpler to fix the problems with the command line tool. Since LWJGL 3 avoids all these problems there should be no need for large refactorings of LWJGL 2 code. |
Three changes: