Hi Stefan, On Tue, Oct 13, 2009 at 06:48:51PM +0200, Stefan Strobl wrote:
Hello
I'm new to both dillo and fltk. I'm trying to do two things and I'm hoping you can point me in the right directions on how to do it.
1) flicker at reload When doing a reload my screen flickers and I'd like to get rid of that. I first tried the dillorc option buffered_drawing=0/1/2 but that didn't make any difference. I then tried to find the source where the screen is cleared before redrawing the page. I followed the source of redraw() until layout.cc where topLevel->draw() is executed but I cannot find its implementation.
I would recommend to start in FltkViewBase::draw(). Or maybe FltkViewport::draw() if you are interested in scrolling too.
Is the flickering an fltk issue or where is the screen cleared?
I'm not sure. It might just be that the freshly loaded page is rendered while it is not 100% loaded, which would blank the screen. Then it is drawn again after loading has completed. I would suggest to put printf()s in FltkViewBase::draw() (the actual draw) and Layout::queueResize() (which requests a complete redraw) to see what is going on. You can also use gdb an breakpoints of course. The flickering is certainly caused by dillo code and is not a general issue of fltk.
2) externally trigger reload I'd like to trigger a page reload externally by another application. I searched a bit about IPC mechanisms of fltk but didn't find any. So I'm thinking about using a UNIX fifo or the system signal SIGUSR2. Do you think this is a good approach?
If you just need to trigger a reload, SIGUSR2 might be ok. For a more general remote control fifo's or maybe stdin might be an option. You can check what other browsers do. Cheers, Johannes PS: Please let us know your findings!