Skip to content
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

Use XRandR and Xinerama to get display info #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 28, 2015

  1. Use XRandR and Xinerama to get display info

    Linux specific. Solves a problem with fullscreen behaviour on multiple-monitor systems.
    
    On Linux, default X11 behaviour seems to describe multiple monitors as a single virtual display (stretched across all physical monitors), so for example it might describe a pair of 1920x1080 monitors as a single 3840x1080 display. Full-screen SDL windows will therefore attempt to cover that 3840x1080 area and stretch across all displays instead of expanding to a single physical screen as they do on Windows and OS X.
    
    SDL_x11modes.c appears to rely on XRandR (or possibly Xinerama) to get information on distinct screens within that virtual display. After enabling both here, fullscreen windows in Linux correctly take full screen on a single monitor.
    
    Compiling requires additional packages libxrandr-dev, libxinerama-dev and a -clean build.
    randomnine committed Nov 28, 2015
    Configuration menu
    Copy the full SHA
    ab912ff View commit details
    Browse the repository at this point in the history