problem with creating multiple windows in SDL 1.3

View: New views
3 Messages — Rating Filter:   Alert me  

problem with creating multiple windows in SDL 1.3

by mweber26 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
If you create a window (#1) in SDL 1.3, then create a new window (#2) later on, then destroy window #2. Window #1 stops responding to mouse events. It appear that this is because SDL re-registers with RegisterRawInputDevices on every window create, which causes #2 to get the inputs (which no longer exists). Does this seem right? If so, should it only do RegisterRawInputDevices on the first window created, or maybe even re-register on a destroy window with another window ID that actually exists?

mike

_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: problem with creating multiple windows in SDL 1.3

by Kenneth Bull :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/11/1 mweber26 <mweber26@...>:
> If you create a window (#1) in SDL 1.3, then create a new window (#2) later
> on, then destroy window #2. Window #1 stops responding to mouse events. It
> appear that this is because SDL re-registers with RegisterRawInputDevices on
> every window create, which causes #2 to get the inputs (which no longer
> exists). Does this seem right? If so, should it only do
> RegisterRawInputDevices on the first window created, or maybe even
> re-register on a destroy window with another window ID that actually exists?

Actually, every window that registers with RegisterRawInputDevices
receives notifications, not just one at a time.  If you're getting
errors like that, it's probably from some other cause.  If the window
is not in focus, then depending on what flags you set when calling
RegisterRawInputDevices, you may not receive input notifications
though.
_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: problem with creating multiple windows in SDL 1.3

by Sam Lantinga-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've entered a bug for this in bugzilla:
http://bugzilla.libsdl.org/show_bug.cgi?id=879

On Sun, Nov 1, 2009 at 1:26 PM, mweber26 <mweber26@...> wrote:

> If you create a window (#1) in SDL 1.3, then create a new window (#2) later
> on, then destroy window #2. Window #1 stops responding to mouse events. It
> appear that this is because SDL re-registers with RegisterRawInputDevices on
> every window create, which causes #2 to get the inputs (which no longer
> exists). Does this seem right? If so, should it only do
> RegisterRawInputDevices on the first window created, or maybe even
> re-register on a destroy window with another window ID that actually exists?
>
> mike
> _______________________________________________
> SDL mailing list
> SDL@...
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>



--
        -Sam Lantinga, Founder and President, Galaxy Gameworks LLC
_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org