SDL_EventFilter

Hullo all,

This callback is documented saying that if you return 1, it is added to the
internal queue, and if you return 0 it is dropped.

I’d like to know if SDL reports the message as ‘handled’ to the window
manager in both situations, or if returning ‘0’ will allow some other
application to attempt to handle the message. In particular, I’m looking to
handle certain wParam’s for WM_SYSCOMMAND under Win32 (i.e., SC_SCREENSAVE),
while leaving others intact for system processing (i.e., SC_TASKLIST).

Thanks - I’ll be sure to clarify the docs (via a note) if someone can answer
this for me.
– Jeff

Hullo all,

This callback is documented saying that if you return 1, it is added to the
internal queue, and if you return 0 it is dropped.

I’d like to know if SDL reports the message as ‘handled’ to the window
manager in both situations, or if returning ‘0’ will allow some other
application to attempt to handle the message. In particular, I’m looking to
handle certain wParam’s for WM_SYSCOMMAND under Win32 (i.e., SC_SCREENSAVE),
while leaving others intact for system processing (i.e., SC_TASKLIST).

Messages like WM_SYSCOMMAND are passed on to you as SDL_SYSWM messages,
but are processed by the default window proc as well. In other words,
they are informational only. If you want to change the way windows
processes those messages, then you’ll have to modify the SDL library.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

“Sam Lantinga” wrote in message
news:mailman.1028326441.29120.sdl at libsdl.org

This callback is documented saying that if you return 1, it is added to
the

internal queue, and if you return 0 it is dropped.

I’d like to know if SDL reports the message as ‘handled’ to the window
manager in both situations, or if returning ‘0’ will allow some other
application to attempt to handle the message. In particular, I’m
looking to

handle certain wParam’s for WM_SYSCOMMAND under Win32 (i.e.,
SC_SCREENSAVE),

while leaving others intact for system processing (i.e., SC_TASKLIST).

Messages like WM_SYSCOMMAND are passed on to you as SDL_SYSWM messages,
but are processed by the default window proc as well. In other words,
they are informational only. If you want to change the way windows
processes those messages, then you’ll have to modify the SDL library.

Thanks for the clarification, Sam.

Would it then be accurate (and useful) for me to add “User Contributed
Notes” to the EventState and EventFilter SDL doc pages saying:

“Regardless of the EventState settings and any EventFilter return values,
the decision to mark messages received from the operating system as handled
or ignored is made by hard-coded logic within SDL. If you have a strong
reason to change the way SDL decides to handle or ignore an OS-generated
event, you will need to modify the SDL source code.”

While I’m thinking about it - is there a way to clear off the “message
board” style entries from the docs?

Thanks,
– Jeff

Would it then be accurate (and useful) for me to add “User Contributed
Notes” to the EventState and EventFilter SDL doc pages saying:

“Regardless of the EventState settings and any EventFilter return values,
the decision to mark messages received from the operating system as handled
or ignored is made by hard-coded logic within SDL. If you have a strong
reason to change the way SDL decides to handle or ignore an OS-generated
event, you will need to modify the SDL source code.”

Sure. You might give an example so people know what you’re talking about. :slight_smile:

While I’m thinking about it - is there a way to clear off the “message
board” style entries from the docs?

I don’t know… Martin, do you know?

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment