Abend with gdk_gc_new_with_values



Hello,

When I was using the version of gtk/gdk that came with RedHat 7 my app
worked fine when I used the following code snippet to set the values in a
new graphics context from those in another:

=== begin code snippet ===

   GtkWidget *drawingarea1;
   GdkGCValues values;
   GdkGCValuesMask mask;
   GdkGC *gc_fg;

   gdk_gc_get_values (drawingarea1->style->fg_gc[GTK_WIDGET_STATE
(drawingarea1)],
                      &values);

   mask = (GDK_GC_FOREGROUND) | (GDK_GC_BACKGROUND) | (GDK_GC_FONT) |
(GDK_GC_FUNCTION) | (GDK_GC_FILL);

   gc_fg = gdk_gc_new_with_values (drawingarea1->window, &values, mask);

=== end code snippet ===

With the versions that came with my RedHat 9 CD, however, the app abends
inside the call to gdk_gc_new_with_values (inserting printf statements
before and after the call shows this) with a segmentation fault.

As a workaround I've resorted to using gdk_gc_new(-) and setting the
values individually, but I'd really like to know what I'm doing wrong.

Any suggestions?

Thanks,

Bryan


*---------------------------------------------------------------
* Bryan Brown      <*>              bbrown radix net
* http://www.radix.net/~bbrown
*---------------------------------------------------------------





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