LLMouseFilter vs. ManagedMouseFilter

Nov 13, 2008 at 5:59 AM
First - thanks for a useful project.  After being spoiled in my browser, I've become a gesture addict.  It's nice to have support for them in Visual Studio.

I was interested in adding support for additional gestures, and so was poking through the code.  I was curious as to the two implementations of the IMouseMessageFilter.  I see that Visual Studio Add In uses the low level filter.  When should each filter be used?  Are there advantages and disadvantages of the two filters?

Also (perhaps I should have created a separate thread), what is the reason for consuming the WM_RBUTTONDOWN and WM_RBUTTONUP events, as opposed to passing them on to the application?
Nov 14, 2008 at 5:44 AM
So after sleeping for a night, I realized the (now obvious) reason for consuming the messages is to inhibit right click actions in the application (like a context menu).  So, disregard that silly question.

I hacked on the MouseGestures component, and re-worked it so that it will recognize arbitrary length gestures composed of the four directional elements.  I've uploaded a patch to the issue regarding additional gesture support at http://www.codeplex.com/mousegestures/WorkItem/View.aspx?WorkItemId=2000.

I've made the necessary changes to the VS AddIn as well, but wanted to rework the gesture configuration to be more like that of other gesture enabled apps, as well as the configuration of keyboard shortcuts in VS.  Once I do that, I'll post the patch on the AddIn project page.
Nov 16, 2008 at 11:48 PM
Edited Nov 16, 2008 at 11:49 PM
Thank you for your contribution. It looks nice.

LLMouseFilter vs. ManagedMouseFilter
The biggest difference between LLMouseFilter and ManagedMouseFilter is that the LLMouseFilter uses Windows Hooks to catch mouse events whereas ManagedMouseFilter uses application message queue.
Generally , if you have access to the apllication message queue (through Application.AddMessageFilter method) it is better to use ManagedMouseFilter. LLMouseFilter was created for VisualStudio plugin, becouse there is no way to access VS message queue.