JayThirtySeven/gosu — comment on commit a2976ebe3167916e5b2a63ed9995846e39ad61b5
File:  line 0
By JayThirtySeven:

As far as I know, it's safe to assume that anybody using a modern version of X11/Xorg will have the Xinerama headers/libraries installed. As long as those are present, the code as written should function fine; the call that gets the screen info returns NULL and sets the number of screens to zero if Xinerama is not in use or otherwise unavailable; in that case using the full geometry of the default screen is the best option (and probably correct, because it should map to exactly one physical monitor if Xinerama is unavailable).

As for screenWidth()/screenHeight(), it shouldn't be a problem to poll Xinerama inside those functions. This is really the first time I've looked at the Gosu code base, so I really wasn't quite sure where to put the modifications. I didn't want to modify those functions because I wasn't sure exactly what they're used for and I don't know anything about the "scoped_resource<>" template being used there. Would it be better to do all of the Xinerama checks inside those two functions, and revert the Window::Window constructor to how it was before?