Ian, you are right.
The call to make_current() was not necessary.
What confused me was that when I removed that call from draw() sometimes the 
objects were not updated correctly after the window was damaged.
But the problem was that the widgets (some of them lines) were drawing two or 
three pixels outside widget's dimensions (x,y,w,h), so I think that they did 
not receive the events to do the redraw.
The problems did not happened in Win32 (by chance, I think)
Now everything works fine.
Thank you very much.


there was a problem in my code
>
> On 4 Jun 2012, at 20:19, David Lopez wrote:
>
> > I spent some time searching and testing my code (it is a rather big =
> application) and just found that some widgets derived from Fl_Box have a =
> custom draw() method which calls make_current() on the window to use =
> fl_begin_polygon ()etc.
> > I know it is not compatible with Fl_Dobuble_Window() (it is curious =
> that it worked on Win32).
> > Now the question is, is there any simple work around to this?, I mean =
> using this drawing functions with double-buffered windows.
>
> I'm sorry, I do not understand what you are doing.
> If you are in the draw method, what advantage does calling =
> make_current() bring you? The draw method can only be invoked when the =
> current window context is being redrawn anyway, so...=20
> Can you clarify what it is that you are doing in the custom draw =
> methods, that needs make_current to be called...?
>
>
>

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

Reply via email to