Mouse coverage in win32 (not DirectX)

there are these lines:

case WM_ACTIVATEAPP: {
int active;

active = (wParam && (GetForegroundWindow() == hwnd));
posted = SDL_PrivateAppActive((Uint8)active,
(SDL_APPINPUTFOCUS|SDL_APPMOUSEFOCUS));
}
break;

but why consider event SDL_APPINPUTFOCUS and SDL_APPMOUSEFOCUS
as the same thing?

I think that SDL_APPINPUTFOCUS is right handled here,
but SDL_APPMOUSEFOCUS means "the application has mouse coverage"
and so I think that the right way to handle it is to check if the
position
of mouse cursor is inside the client area of the window.

Can you please answer me what do you think about it?

Bye.
Enzo.

NOTE: In Linux it works correctly.

there are these lines:

case WM_ACTIVATEAPP: {
int active;

active = (wParam && (GetForegroundWindow() == hwnd));
posted = SDL_PrivateAppActive((Uint8)active,
(SDL_APPINPUTFOCUS|SDL_APPMOUSEFOCUS));
}
break;

but why consider event SDL_APPINPUTFOCUS and SDL_APPMOUSEFOCUS
as the same thing?

I think that SDL_APPINPUTFOCUS is right handled here,
but SDL_APPMOUSEFOCUS means "the application has mouse coverage"
and so I think that the right way to handle it is to check if the
position
of mouse cursor is inside the client area of the window.

Can you please answer me what do you think about it?

I think you are absolutely correct. Want to submit a patch? :slight_smile:

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

I think you are absolutely correct. Want to submit a patch? :slight_smile:

Ok, on monday I’ll write it and then I’ll send it to you,
so you can fix it in SDL’s next release
(wow, this is my first help to wonderful open-source’s world) :slight_smile:

Bye, Enzo.