We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2803 - Patch adding multiple Wayland display outputs
Summary: Patch adding multiple Wayland display outputs
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.3
Hardware: All Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.4
Depends on: 2913
Blocks:
  Show dependency treegraph
 
Reported: 2014-12-05 17:38 UTC by Dmitry
Modified: 2015-04-12 01:28 UTC (History)
4 users (show)

See Also:


Attachments
HG patch (15.55 KB, patch)
2014-12-05 17:38 UTC, Dmitry
Details | Diff
Other version of this patch (1.28 KB, patch)
2015-03-28 19:15 UTC, bugs
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry 2014-12-05 17:38:34 UTC
Created attachment 1955 [details]
HG patch

This patch add wayland multiple output support.

Output number can be specified for fullscreen windows via SDL_WINDOWPOS_CENTERED_DISPLAY(X) option in SDL_CreateWindow.

P.S i am not fully fluent with mercurial and develop in git, so just in case here is the git patch:

http://dump.bitcheese.net/files/ykexyfo/0001-Add-multiple-display-outputs.git.patch
Comment 1 bugs 2015-03-28 19:15:16 UTC
Created attachment 2096 [details]
Other version of this patch

This patch is implemented on top of bug 2913, which uses imo a better design than the previous patch.
Comment 2 Ryan C. Gordon 2015-04-07 19:25:05 UTC
Ok, to be clear, we want to apply Attachment #2017 [details] from Bug #2913, and then Attachment #2096 [details] from this bug on top of that, right?

And not Attachment #1955 [details] at all?

--ryan.
Comment 3 bugs 2015-04-07 20:10:54 UTC
That’s exact, Attachment #1955 [details] was introducing a lot of unneeded complexity in there.
Comment 4 Ryan C. Gordon 2015-04-08 02:43:43 UTC
(In reply to Ryan C. Gordon from comment #2)
> Ok, to be clear, we want to apply Attachment #2017 [details] from Bug #2913,

(oops, I meant Attachment #2107 [details])

--ryan.
Comment 5 Ryan C. Gordon 2015-04-08 02:47:35 UTC
(In reply to bugs from comment #1)
> Created attachment 2096 [details]
> Other version of this patch
> 
> This patch is implemented on top of bug 2913, which uses imo a better design
> than the previous patch.

This patch is now https://hg.libsdl.org/SDL/rev/d001cff818bb, thanks!

--ryan.
Comment 6 x414e54 2015-04-12 01:28:08 UTC
Hi good work on the multiple output support.

I have a few issues about the way SDL is currently handling outputs:

1. SDL is currently not listening for the global_remove events:

So if any output is removed then SDL would be trying to fullscreen to a non existent display.

2. SDL appears not to be tracking the output the surface is on. 

This means the window will always fullscreen to the primary display or display the application picked via SDL_SetWindowPosition or SDL_SetWindowDisplayMode. Even if the user moved the window to a different display it will fullscreen on the one it was created on (not good).
 
It is possible to emulate this by tracking the surface enter/leave events but the surface may be on/overlapping multiple outputs.