Hi All,
I have created a transparent region, which is forced front and is sensitive to a specific Key event (Ph_EV_KEY). The widget has no parent, and had an event handler (by using PtAddEventHandler).
Now, my region is good enough to call my event handler (myEventHandler) on the desired specific call event. But, I wanted to disable my event handler for the time, it is still running.
To elaborate, my event handler displays a dialog window and I don’t want another dialog, when I press the desired keys, while a dialog window is still open.
I know I can track this using some tracking mechanism in the dialog that I open, but alternatively,
I tried to call PtRemoveEventHandler() at the start of the myEventHandler and PtAddEventHandler() at the end of it. But when the key events occur, the system crashes/hangs. Nothing happens and I’m forced to restart the computer.
I pass on the PtWidget_t* & the pointer of/to the myEventHandler to PtRemoveEventHandler() & PtAddEventHandler().
Does anybody know the reason why this is happenning?