This project is read-only.

Nuclex.Input WindowMessageFilter prevents messages from reaching other IMessageFilter objects

Jul 4, 2011 at 10:36 AM

It seems to me that this method in Nuclex.Input should always return "false".

bool Nuclex.Input.WindowMessageFilter.PreFilterMessage(ref Message message);

The current implementation returns "true" if the message has been handled by Nuclex. However, that prevents other IMessageFilter implementations from hooking the same message.

Have I got the wrong idea here?

Jul 5, 2011 at 9:18 AM

Hm, I can't remember why I did it that way, but it looks intentional (mouse messages are passed on, but keyboard messages are handled).

Would you prefer it if the message filter didn't hog the keyboard messages?

I don't expect any problems from changing this, so I could just have it return false for the next release.

Jul 5, 2011 at 11:29 AM

I've changed it in my local copy because I register another IMessageFilter later in my application. The only way I could make it work is was to return "false" from Nuclex's IMessageFilter. I think it would be a good change :)