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

Android: creation of multiple SDL_window #3719

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 1 comment
Closed

Android: creation of multiple SDL_window #3719

SDLBugzilla opened this issue Feb 11, 2021 · 1 comment
Labels
abandoned Bug has been abandoned for various reasons

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: don't know
Reported for operating system, platform: Android (All), All

Comments on the original bug report:

On 2020-06-04 11:39:24 +0000, Sylvain wrote:

Currently SDL2 has a limitation of 1 SDL_Window, and it could be possible to create several.

May be interesting when running on chromebook, or phone with several screens.
There is a also a multi-window mode on phone.

On 2020-06-04 11:43:11 +0000, Sylvain wrote:

Created attachment 4368
demo app

This is a small demo app, that creates/deletes SDL_Window and just render a blinking screen and a cursor on each.

Press two fingers at each corner, to create-delete a window.
The first created window is red, created from the top-left.
You can create/delete from the other 3 corners.

On 2020-06-04 12:00:06 +0000, Sylvain wrote:

Created attachment 4369
prototype patch

This is an unfinished patch. most secondary features are not tested, and it has bugs for sure.

It shows we can create several SDL_Window, each one has its own activity and SurfaceView.

Due to the nature of Activity that are "stacked" on a phone, the SDL_Window are also stacked when used on a basic phone. And it's not possible to re-order the stacked composed of several instance of the same activity. (though, it's possible to re-order several different activities).

On a phone that started the multiwindow mode, it's possible to have two window adjacent. But multiwindow isn't meant to be activated by the application. So it's not really useful.

On a chromebook. I don't have one and I simply tested it with the emulator and it indeed creates several windows. This case seems interesting. The emulator isn't really stable, so it's hard to tell more...

A phone with several screen: not tested / don't have one neither.

Some points with the patch:

  • SDLWindowActivity class it for creating SDL_window.
  • SDLActivity remains to start the SDL thread. this isn't convenient to have this activity ... Android has also "service" class, but it's doesn't create a icon to launch the app ...
    -> what is bad is that there is a glitch transition from SDLActivity to the first SDLWindowActivity, which seems unnecessary.
  • after multiple/stress creation/deletion of window, there are issues with backup-restore of egl context, not sure when it comes from ...

Some other point:

  • I wonder whether starting a SDL_Window in a new instance of activity is a good choice, maybe it should be run in what android call "fragment" ?

On 2020-06-04 16:05:01 +0000, Sam Lantinga wrote:

Conceptually in SDL all the windows are in a single activity. I don't know how Android represents multiple windows and whether this is a requirement of the system, but it seems worth exploring.

@slouken slouken removed the bug label May 11, 2022
@slouken slouken added the abandoned Bug has been abandoned for various reasons label Nov 7, 2023
@slouken
Copy link
Collaborator

slouken commented Nov 7, 2023

SDL 2.0 is now in maintenance mode, and all inactive issues are being closed. If this issue is impacting you, please feel free to reopen it with additional information.

@slouken slouken closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abandoned Bug has been abandoned for various reasons
Projects
None yet
Development

No branches or pull requests

2 participants