[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-dev] Key presses and FilterEvent



Luke,

In CCamApp::FilterEvent, if HandleKeyPress() returns TRUE (the keypress
is handled), there is code documented to return so that the event has
been handled so further processing does not take place. However, that
doesn't happen, it returns -1. If the keypress is not handled, it
falls through and also returns -1. This would appear to be a bug.

It's also a SEGV generating bug, because if HandleKeyPress deletes
the event object or sets about deleting it (for instance a FileClose
hotkey), ProcessEvent (which calls FilterEvent) then sets about trying
to do stuff we a window which is going away. This reliably causes
a SEGV.

I believe we should return 1 in the case where HandleKeyPress returns
1.

I'm loathe to touch the key handling code but I don't think we can
leave it like this as it's dangerous.

Alex