fluid live mode.

This is around line 2250
   // changed w+20 to w+80 rs->
live_window = new DoubleBufferWindow(w+80, h+55, "Fluid Live Mode Widget");

This is around 2260. I commented out the resizable() line.
  // live_window->resizable(live_widget); // <-rs

The resizing scales the contents so it's not so good.

---------

No biggie, but if the string funcs are in fltk namespace the
docs need to be changed or the code does.

I think the string.h file *IS* in fltk namespace?

This is in fltk/string.h

 #include "FL_API.h"

 FL_API extern char* newstring(const char *);

etc...

---------

Add a minimal pause (1 microsecond) to add better time sharing
between threads.
In fltk/lock.cxx

 #include <unistd.h>
 void fltk::lock() {usleep(1); init_or_lock_function();}

This still doesn't fix the attempt to scroll the browser to
the bottom in the threads demo though.  The Browser is a
monster and probably has too much to do to scroll to the
bottom.  I replaced them with simple TextDisplay Widgets
and it cruises right along.

See attached 'thread-display' tarball.

There are a couple of notes down around the #include <unistd.h>

And the fact that the browser widgets weren't time sharing tells
us something.  We probably can't hog all the time in threads (fd's).

Timeouts and especially the X queue needs plenty of time to
send messages to complex widgets like the Browser.

I think this is the problem because when I was playing with
this, the app completely hung.  X was unable to to anything.

What I did that caused it to hang was to try to send a
cbScroll call back a command in a timeout loop so that
the browser would scroll in a timeout.
Boy!  That sure didn't work.  =-O


Attachment: threads-display.tar.gz
Description: GNU Zip compressed data

_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to