On Mon, Apr 28, 2008 at 09:21:16PM +0000, corvid wrote:
Since findtext has been in the news lately, I might as well at least provide this bit so that my code behaves better with dialogs.
What is this patch for?
diff -pur dw2/dw/fltkviewport.cc dw2-cur/dw/fltkviewport.cc --- dw2/dw/fltkviewport.cc 2008-04-26 18:21:55.000000000 +0000 +++ dw2-cur/dw/fltkviewport.cc 2008-04-28 20:40:43.000000000 +0000 @@ -273,6 +273,10 @@ int FltkViewport::handle (int event) positionChanged(); break;
+ case ::fltk::LEAVE: + mouse_x = mouse_y = -1; + break; + case ::fltk::SHORTCUT: switch (::fltk::event_key()) { case PageUpKey: @@ -324,14 +328,15 @@ void FltkViewport::setCanvasSize (int wi }
/* - * This is needed when a position change is not the result of mouse motion. + * This is used to simulate mouse motion (e.g., when scrolling). */ void FltkViewport::positionChanged () { - (void)theLayout->motionNotify (this, - translateViewXToCanvasX (mouse_x), - translateViewYToCanvasY (mouse_y), - (core::ButtonState)0); + if (mouse_x != -1) + (void)theLayout->motionNotify (this, + translateViewXToCanvasX (mouse_x), + translateViewYToCanvasY (mouse_y), + (core::ButtonState)0); }
/* diff -pur dw2/dw/textblock.cc dw2-cur/dw/textblock.cc --- dw2/dw/textblock.cc 2008-04-17 13:30:05.000000000 +0000 +++ dw2-cur/dw/textblock.cc 2008-04-28 20:52:39.000000000 +0000 @@ -549,12 +549,12 @@ bool Textblock::motionNotifyImpl (core::
void Textblock::enterNotifyImpl (core::EventCrossing *event) { - hoverLink = -1; }
void Textblock::leaveNotifyImpl (core::EventCrossing *event) { - (void) emitLinkEnter (-1, -1, -1, -1); + hoverLink = -1; + (void) emitLinkEnter (hoverLink, -1, -1, -1); }
/**
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
-- Cheers Jorge.-