From: alx Date: Thu, 23 Jul 2015 18:27:20 +0000 (+0200) Subject: DtWidget: added appropriate KeyPress event handler to DtIcon widget X-Git-Tag: 2.2.4~24 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c67763c82d63a2e04c963b5e69361cf5490643bb;p=oweals%2Fcde.git DtWidget: added appropriate KeyPress event handler to DtIcon widget --- 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)