On 21 Aug 2009, at 21:51, Rodrigo Morante wrote:
> The code below is as naive as it could get. It works correctly under
> Windows XP. It also works correctly under Ubuntu Linux *if Compiz is
> used*. I also tried this: I used a Windows XP virtual machine and
> through SSH ran it in Ubuntu (without Compiz) and it also worked. So,
> as somebody hinted, there's a problem with X.

No, I don't think this is correct - I don't think there is a problem  
with X per se, rather I think your example is (still) slightly wrong.

As I said in earlier posts, you can really only be sure the graphical  
context is correct for you to call fl_read_image() when you are in  
the draw() method of the widget you are trying to sample.

But you persist in calling it from your callback, so you *can not*  
expect it to work correctly.

The only hope you have of making this work correctly, if you must  
call fl_read_image() from your callback, is to do a widget- 
 >make_current() immediately before the fl_read_image().
Then it will *probably* work OK for you.

As it stands, since your code is flawed, I don't think we can assume  
anything else about any bugs or misfeatures you are seeing.
If you fix your code, and it *still* does not work, *then* maybe  
there is a problem...




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

Reply via email to