Re: minor fix for GdkPixbuf



On 26 Jun 2001, Havoc Pennington wrote:

> 
> Hi,
> 
> This is the obvious change but it doesn't actually work due to a race
> condition - the window can move between the call to get its position
> and the actual gdk_image_get().
> 
> I'll merge your patch with some other fixes I have to GdkPixbuf; 
> the solution to the race condition is to grab the server before
> getting the window position, and release after calling
> gdk_image_get().
> 
> This means putting the clipping in a slightly different place,
> etc. But I hadn't written the clip code yet, so thanks for that.

erk. ok two things:
1) if you grab the server, mention it in the docu because that makes things
   slow and people shouldn't use it in a loop. (though it's probably the
   right way to do things)
2) deskguide won't be able to use it for snap-shooting with server grabs.
   however, i don't see deskguide as enough for a reason to destabelize
   gdk's common code path, so i'd apprechiate any pointers as to what you
   improved over deskguide's shooting code, in order to back-merge these
   things.
   
> 
> Havoc
> 

---
ciaoTJ





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]