sdl2_window icon indicating copy to clipboard operation
sdl2_window copied to clipboard

Support multiple windows

Open HybridEidolon opened this issue 10 years ago • 2 comments

SDL2 doesn't delineate events between windows in the video subsystem, so when one Sdl2Window gets the event pump for polling events, it will capture events from all existing SDL2 Windows.

HybridEidolon avatar Aug 03 '15 15:08 HybridEidolon

I see. This becomes problematic when WindowSettings is the only thing passed to the constructor.

I guess some sharing mechanism is required to make this work. Perhaps we should have a way of passing in custom information to WindowSettings?

WindowSettings<T = ()>

bvssvni avatar Aug 03 '15 16:08 bvssvni

I think the only way to handle this is to add an additional event pump layer in front of SDL's that the calling code has to set up and poll, and send those events into each window manually. It wouldn't be possible to toss a window on each thread and have them handle their own event polling with the constraints of the SDL event system, even though it allows for polling on threads other than the main one.

HybridEidolon avatar Aug 03 '15 20:08 HybridEidolon