This patch removes the special behaviour of the <Enter> key for the FltkMultiLineTextResource. In fact it removes the callback altogether, the resource simply holds text and has no activity. Regards, Jeremy Henty diff -pru -- dw2-ref/dw/fltkui.cc dw2-cur/dw/fltkui.cc --- dw2-ref/dw/fltkui.cc 2007-12-17 23:39:52.000000000 +0000 +++ dw2-cur/dw/fltkui.cc 2007-12-18 16:05:59.000000000 +0000 @@ -552,8 +552,6 @@ FltkMultiLineTextResource::~FltkMultiLin new ::fltk::MultiLineInput (allocation->x, allocation->y, allocation->width, allocation->ascent + allocation->descent); - input->callback (widgetCallback, this); - input->when (::fltk::WHEN_ENTER_KEY_ALWAYS); if (viewsAndWidgets->isEmpty ()) { // First widget created, attach the set text. @@ -586,21 +584,6 @@ void FltkMultiLineTextResource::sizeRequ } } -void FltkMultiLineTextResource::widgetCallback (::fltk::Widget *widget, - void *data) -{ - /* The (::fltk::event_key() == ::fltk::ReturnKey) test - * is necessary because WHEN_ENTER_KEY also includes - * other events we're not interested in. For instance pressing - * The Back or Forward, buttons, or the first click on a rendered - * page. BUG: this must be investigated and reported to FLTK2 team - */ - printf ("when = %d\n", widget->when ()); - if ((widget->when () & ::fltk::WHEN_ENTER_KEY_ALWAYS) && - (::fltk::event_key() == ::fltk::ReturnKey)) - ((FltkMultiLineTextResource*)data)->emitActivate (); -} - const char *FltkMultiLineTextResource::getText () { if (viewsAndWidgets->isEmpty ()) diff -pru -- dw2-ref/dw/fltkui.hh dw2-cur/dw/fltkui.hh --- dw2-ref/dw/fltkui.hh 2007-12-17 16:00:34.000000000 +0000 +++ dw2-cur/dw/fltkui.hh 2007-12-18 16:06:11.000000000 +0000 @@ -321,8 +321,6 @@ private: bool editable; int numCols, numRows; - static void widgetCallback (::fltk::Widget *widget, void *data); - protected: ::fltk::Widget *createNewWidget (core::Allocation *allocation);