About SDL_MOUSEBUTTONDOWN and focus

Hello everyone, I have a question:
When the SDL window loses the focus of the mouse, the mouse clicks on the button inside the canvas. Why is there no response to the SDL_MOUSEBUTTONDOWN message? This causes me to click 2 times to achieve a normal click. Does anyone know? What I want to achieve is that even if the window loses the focus of the mouse, the button inside the canvas can be clicked at once.

Check out this hint:

SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1");

I think this should do exactly what you want.

Thanks bro!! It’s effective。