The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
[PATCH] Respect DISPLAY screen number in X11
Steaphan Greene
Guest

I have a setup with one X11 display, which has two screens. These screens are separate, they are not left, right, above, or below of one-another. They are actually in completely different locations, so none of these descriptions would make any sense.

I was not able to figure out how to get an SDL window (fullscreen or otherwise) to show up on the second screen.  No matter what I tried, it always showed up on the first.

Also, the DISPLAY variable's screen number was completely ignored.

While I believe there are still some issues left here, proper support of the DISPLAY variable's screen number was pretty trivial to add, and solved my problems.

I believe this patch does not break the original design of how this was supposed to work, as it only rearranges the order of the screens in the list of modes (simply swapping the default screen to be first, if it isn't already).

Anything that looks through all the SDL displays will still see all the displays' modes, and will still get to select from them, just as before.

Anything that doesn't check the displays, and just opens on the default screen will now use the correct default screen, as specified in the DISPLAY env var.

I tested this with both SDL2 FULLSCREEN_DESKTOP windows, and with non-fullscreen windows, with both my first and second screens, and, with this patch, they now all work fine.
[PATCH] Respect DISPLAY screen number in X11
Jeffrey Carpenter
Guest

Hello,

(Just trying to help the development of SDL) It might be a good idea to also post this on the bug tracker, so this does not get lost in the mailing lists.

Cheers,
Jeffrey Carpenter


On 2014/10/ 08, at 13:58, Steaphan Greene wrote:

Quote:
I have a setup with one X11 display, which has two screens. These screens are separate, they are not left, right, above, or below of one-another. They are actually in completely different locations, so none of these descriptions would make any sense.

I was not able to figure out how to get an SDL window (fullscreen or otherwise) to show up on the second screen. No matter what I tried, it always showed up on the first.

Also, the DISPLAY variable's screen number was completely ignored.

While I believe there are still some issues left here, proper support of the DISPLAY variable's screen number was pretty trivial to add, and solved my problems.

I believe this patch does not break the original design of how this was supposed to work, as it only rearranges the order of the screens in the list of modes (simply swapping the default screen to be first, if it isn't already).

Anything that looks through all the SDL displays will still see all the displays' modes, and will still get to select from them, just as before.

Anything that doesn't check the displays, and just opens on the default screen will now use the correct default screen, as specified in the DISPLAY env var.

I tested this with both SDL2 FULLSCREEN_DESKTOP windows, and with non-fullscreen windows, with both my first and second screens, and, with this patch, they now all work fine.
<SDL2_screen_from_DISPLAY.patch>_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
[PATCH] Respect DISPLAY screen number in X11
Steaphan Greene
Guest

Ooo, there is a bug tracker now?

It's been several years since I've contributed to SDL... mercurial was a surprise too.  Wink

On Wed, Oct 8, 2014 at 3:41 PM, Jeffrey Carpenter wrote:
Quote:
Hello,

(Just trying to help the development of SDL) It might be a good idea to also post this on the bug tracker, so this does not get lost in the mailing lists.

Cheers,
Jeffrey Carpenter


On 2014/10/ 08, at 13:58, Steaphan Greene wrote:

Quote:
I have a setup with one X11 display, which has two screens. These screens are separate, they are not left, right, above, or below of one-another. They are actually in completely different locations, so none of these descriptions would make any sense.

I was not able to figure out how to get an SDL window (fullscreen or otherwise) to show up on the second screen.  No matter what I tried, it always showed up on the first.

Also, the DISPLAY variable's screen number was completely ignored.

While I believe there are still some issues left here, proper support of the DISPLAY variable's screen number was pretty trivial to add, and solved my problems.

I believe this patch does not break the original design of how this was supposed to work, as it only rearranges the order of the screens in the list of modes (simply swapping the default screen to be first, if it isn't already).

Anything that looks through all the SDL displays will still see all the displays' modes, and will still get to select from them, just as before.

Anything that doesn't check the displays, and just opens on the default screen will now use the correct default screen, as specified in the DISPLAY env var.

I tested this with both SDL2 FULLSCREEN_DESKTOP windows, and with non-fullscreen windows, with both my first and second screens, and, with this patch, they now all work fine.


Quote:
<SDL2_screen_from_DISPLAY.patch>_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
[PATCH] Respect DISPLAY screen number in X11
Alex Szpakowski
Guest

Related: https://bugzilla.libsdl.org/show_bug.cgi?id=2192

On Oct 8, 2014, at 3:58 PM, Steaphan Greene wrote:
Quote:
I have a setup with one X11 display, which has two screens. These screens are separate, they are not left, right, above, or below of one-another. They are actually in completely different locations, so none of these descriptions would make any sense.

I was not able to figure out how to get an SDL window (fullscreen or otherwise) to show up on the second screen. No matter what I tried, it always showed up on the first.

Also, the DISPLAY variable's screen number was completely ignored.

[PATCH] Respect DISPLAY screen number in X11
Steaphan Greene
Guest

Yes, indeed.  I found that same one (now that I knew there was a bug tracker!).  I've attached this patch, and the relevant description to that bug:

https://bugzilla.libsdl.org/show_bug.cgi?id=2192


On Wed, Oct 8, 2014 at 5:15 PM, Alex Szpakowski wrote:
Quote:
Related: https://bugzilla.libsdl.org/show_bug.cgi?id=2192

On Oct 8, 2014, at 3:58 PM, Steaphan Greene wrote:

Quote:
I have a setup with one X11 display, which has two screens. These screens are separate, they are not left, right, above, or below of one-another. They are actually in completely different locations, so none of these descriptions would make any sense.

I was not able to figure out how to get an SDL window (fullscreen or otherwise) to show up on the second screen.  No matter what I tried, it always showed up on the first.

Also, the DISPLAY variable's screen number was completely ignored.





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org