Skip to content

Do not retain the windows events if they are not treated

Xabi requested to merge Xabi/vtk:win32-interactor-events-propagation into master

Currently the windows events managed in vtkHandleMessage2 are always considered processed by vtk and vtkHandleMessage2 returns 0, but it should do it only if it really processes the message, otherwise fallback to CallWindowProc. That will allow the application to treat the message if desired, or to set a hook procedure.

An example usecase is a keyboard event passed to OnKeyDown, if vtk does nothing with it, the event is blocked and not propagated to the application, when it should be.

So in this patch, all the OnXXX methods of vtkWin32RenderWindowInteractor return a value indicating whether the event was processed or not (using the return of InvokeEvent), and if not the event is propagated.

Merge request reports