From c67763c82d63a2e04c963b5e69361cf5490643bb Mon Sep 17 00:00:00 2001 From: alx Date: Thu, 23 Jul 2015 20:27:20 +0200 Subject: [PATCH] DtWidget: added appropriate KeyPress event handler to DtIcon widget --- cde/lib/DtWidget/Icon.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/cde/lib/DtWidget/Icon.c b/cde/lib/DtWidget/Icon.c index d91a4b99..400fe97e 100644 --- a/cde/lib/DtWidget/Icon.c +++ b/cde/lib/DtWidget/Icon.c @@ -1088,17 +1088,22 @@ IconActivate( } else { - delay = (unsigned long) - XtGetMultiClickTime (XtDisplay (g)); - G_ClickEvent (g) = (XButtonEvent *) - XtMalloc (sizeof (XButtonEvent)); - *(G_ClickEvent (g)) = *b_event; - G_Sync (g) = True; - G_ClickTimerID (g) = - XtAppAddTimeOut ( - XtWidgetToApplicationContext ((Widget)g), - delay, (XtTimerCallbackProc)ClickTimeout, - (XtPointer) g); + if(event->type==KeyPress){ + G_Armed(g)=False; + (*call_callback)(g,G_Callback(g),XmCR_SELECT,event); + }else{ + delay = (unsigned long) + XtGetMultiClickTime (XtDisplay (g)); + G_ClickEvent (g) = (XButtonEvent *) + XtMalloc (sizeof (XButtonEvent)); + *(G_ClickEvent (g)) = *b_event; + G_Sync (g) = True; + G_ClickTimerID (g) = + XtAppAddTimeOut ( + XtWidgetToApplicationContext ((Widget)g), + delay, (XtTimerCallbackProc)ClickTimeout, + (XtPointer) g); + } } if (G_ShadowThickness (g) > 0) -- 2.25.1