[SDL] Collecting Input using SDL_CreateWindowFrom

Ryan C. Gordon icculus at icculus.org
Sun Jul 31 17:55:25 PDT 2011

> In short I'm trying to change the way Ogre and SDL are bound to each
> other in my project by using the SDL_CreateWindowFrom() function. When I
> try this, I get zero input events. As if nothing is happening. I've
> verified my main loop and event manager are working fine, just not
> getting any events from SDL. I thought maybe since SDL doesn't "own" the
> window made by this function it turns off input grab for the window by
> default, so it doesn't try to step on the toes of something else that
> may be doing the same(got the idea from a post on these forums). So I
> tried to enable input grab for the window and there is still no input
> events being generated.

We override the window's original event handler (and then call it after 
we've run our own).

Can you set a breakpoint on WIN_WindowProc(), in 
SDL/src/video/windows/SDL_windowsevents.c ? If this function isn't being 
called, then we never got control of the window's event handler.

ALSO: if it _is_ getting called, but that GetProp() call near the start 
fails, that would cause the behaviour you're seeing. Since the matching 
SetProp() seemed to be failing for you in the other thread, I imagine 
this will be the actual culprit.


More information about the SDL mailing list