No SDL_MOUSEDOWN when SDL window activated


On Windows 10, when I click on an inactive SDL window I’m not getting a corresponding SDL_MOUSEBUTTONDOWN event (or a SDL_MOUSEBUTTONUP). Once window is active, everything works as expected.

I know this is the default behavior for Mac apps, but Windows apps typically do respond to the ‘activating’ mouse click.

Is this a bug or just the way SDL works?


You can use the SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH hint (via SDL_SetHint) to control that behaviour.

Thank you!

Padding this message to 20 chars kinda weird but that’s OK…