Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title Undocumented multiple clicking on PtTerminal
Ref. No. QNX.000009869
Category(ies) Development
Issue It seems as if a new feature has been added to PtTerminal in Phonton 1.13.

- Double-clicking selects a word,
- Triple-clicking selects the current line,
- Quadruple-clicking selects the whole screen.

This feature confused us because we thought that we discovered a bug when the whole screen turned reverse video display (because of the colors we use).
If there is an existing way to disable this feature?



Solution The only simple way is to disable selecting altogether. You can use the filter callback to prevent PtTerminal from seing the multiple clicks.
Consider that the filter callback would have to be placed on the PARENT of the terminal widget.

x09int parentOfTermFilterCB(PtWidget_t *widget, void *data, PtCallbackInfo *cbinfo){
x09/*assuming the event mask provided for the filter callback includes only Ph_EV_BUT_PRESS*/
x09x09PhPointerEvent_t *pev = PhGetData(cbinfo->event);
x09x09if(pev->click_count > 1)
x09x09x09x09return Pt_END; /*do not allow the event to be used*/
x09x09return Pt_CONTINUE;
x09}
x09
x09x09