Very small bug in gdk_gc_copy()



There is a problem with the function gdk_gc_copy(), the very last
bit of code in gdkgc.c.  When you use it to copy a GdkGC, not all
of the characteristics of the GC get copied... in particular, clipping
information is not copied.  Other stuff probably isn't copied either.

The problem is with line 655 of gdkgc.c, the last real line of code in the
file.  It says:

XCopyGC (src_private->xdisplay, src_private->xgc, 0xffff, dst_private->xgc);

The 0xffff is not sufficient to make sure that all components of the
GC actually get copied.  Replacing it with 0xffffffff clears up the
problem under Linux on the Intel.  I don't actually know anything
about X, though, so I don't know if this is portable...

-Jon Trowbridge



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