[SDL] Opening windows on different X displays (Ubuntu 12)

Reto Schneider mailinglisten at reto-schneider.ch
Sun Mar 24 05:21:56 PDT 2013

On 03/24/2013 04:05 AM, Alex Barry wrote:
> SDL_GetWindowDisplayIndex is relative to the X/Display instance, so if
> each of your monitors runs within it's own X/Display, then the display
> index will always be 0.  This isn't an SDL issue, this is how X11 works.

That's true, probably the problem should be fixed somewhere else.

The problem is, that the platform agnostic SDL_* functions depends on
display numbers different from 0 to be encoded in the x/y values. In the
X11_* context, the SDL_Window x/y values are expected to be absolute. So
when passing a SDL_Window struct used in the X11_* context to a SDL_*
function, it simply can no longer extract the display information (in a
non TwinView/Xinerama environment).

Any suggestions for a fix?

More information about the SDL mailing list