I've had lots of trouble with widgets disappearing because my machine is too slow to keep up. But today I had the good fortune to happen to stumble upon updateCanvasWidgets()... Johannes, are there any unintended consequences to this fix?
On Fri, Mar 28, 2008 at 05:14:48PM +0000, place wrote:
I've had lots of trouble with widgets disappearing because my machine is too slow to keep up. But today I had the good fortune to happen to stumble upon updateCanvasWidgets()...
Excellent that you have found this bug. I had seen this problem once using dillo via remote X11 but could not reproduce it at home.
Johannes, are there any unintended consequences to this fix?
Your patch seems correct, but I'd like to cleanup the scrolling code a bit more. Anyway, I have no objections to commit this for now. Cheers, Johannes
diff -pur dw2/dw/fltkviewport.cc dw2-cur/dw/fltkviewport.cc --- dw2/dw/fltkviewport.cc 2008-02-29 18:26:27.000000000 +0000 +++ dw2-cur/dw/fltkviewport.cc 2008-03-28 16:55:57.000000000 +0000 @@ -186,6 +186,7 @@ void FltkViewport::draw ()
if (d & DAMAGE_SCROLL) { set_damage (DAMAGE_SCROLL); + updateCanvasWidgets (scrollDX, scrollDY); scrollrect(cr, -scrollDX, -scrollDY, draw_area, this); d &= ~DAMAGE_SCROLL; set_damage (d); @@ -377,7 +378,6 @@ void FltkViewport::scroll (int dx, int d
adjustScrollbarValues (); redraw (DAMAGE_SCROLL); - updateCanvasWidgets (oldScrollX, oldScrollY); theLayout->scrollPosChanged (this, scrollX, scrollY); }
@@ -400,16 +400,16 @@ void FltkViewport::setViewportSize (int vscrollbar->hide (); }
-void FltkViewport::updateCanvasWidgets (int oldScrollX, int oldScrollY) +void FltkViewport::updateCanvasWidgets (int dx, int dy) { for(Iterator <TypedPointer < ::fltk::Widget> > it = canvasWidgets->iterator (); it.hasNext (); ) { ::fltk::Widget *widget = it.getNext()->getTypedValue (); - if (oldScrollX != scrollX) - widget->x (widget->x () - scrollX + oldScrollX); - if (oldScrollY != scrollY) - widget->y (widget->y () - scrollY + oldScrollY); + if (dx) + widget->x (widget->x () - dx); + if (dy) + widget->y (widget->y () - dy); } }
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
On Fri, Mar 28, 2008 at 08:56:36PM +0000, place wrote:
Johannes, are there any unintended consequences to this fix?
Your patch seems correct, but I'd like to cleanup the scrolling code a bit more. Anyway, I have no objections to commit this for now.
Cool. Thanks!
Committed. -- Cheers Jorge.-
participants (3)
-
jcid@dillo.org
-
Johannes.Hofmann@gmx.de
-
place@gobigwest.com