diff options
author | Michael Natterer <mitch@imendio.com> | 2007-06-07 21:22:15 +0000 |
---|---|---|
committer | Michael Natterer <mitch@src.gnome.org> | 2007-06-07 21:22:15 +0000 |
commit | dde0d5ffa5335ae7e12ae8103ad89d90bfda6601 (patch) | |
tree | 82bc9dff405a2366d92c4dc3e66ee803d1bcbdb2 /gdk/quartz/gdkgc-quartz.c | |
parent | 88a05af64f44cbe26a1d166b5745791574620132 (diff) | |
download | gtk+-dde0d5ffa5335ae7e12ae8103ad89d90bfda6601.tar.gz |
add gdk_gc_quartz_init() and set some values to the defaults used by X11.
2007-06-07 Michael Natterer <mitch@imendio.com>
* gdk/quartz/gdkgc-quartz.c: add gdk_gc_quartz_init() and set
some values to the defaults used by X11.
(gdk_quartz_gc_set_values): really set cap_style when
GDK_GC_CAP_STYLE is in the mask, not line_style.
svn path=/trunk/; revision=18079
Diffstat (limited to 'gdk/quartz/gdkgc-quartz.c')
-rw-r--r-- | gdk/quartz/gdkgc-quartz.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gdk/quartz/gdkgc-quartz.c b/gdk/quartz/gdkgc-quartz.c index 26273e1a36..159d707dbf 100644 --- a/gdk/quartz/gdkgc-quartz.c +++ b/gdk/quartz/gdkgc-quartz.c @@ -101,7 +101,7 @@ gdk_quartz_gc_set_values (GdkGC *gc, private->line_style = values->line_style; if (mask & GDK_GC_CAP_STYLE) - private->line_style = values->line_style; + private->cap_style = values->cap_style; if (mask & GDK_GC_JOIN_STYLE) private->join_style = values->join_style; @@ -150,6 +150,18 @@ gdk_gc_quartz_class_init (GdkGCQuartzClass *klass) gc_class->set_dashes = gdk_quartz_gc_set_dashes; } +static void +gdk_gc_quartz_init (GdkGCQuartz *gc_quartz) +{ + gc_quartz->function = GDK_COPY; + gc_quartz->subwindow_mode = GDK_CLIP_BY_CHILDREN; + gc_quartz->graphics_exposures = TRUE; + gc_quartz->line_width = 0; + gc_quartz->line_style = GDK_LINE_SOLID; + gc_quartz->cap_style = GDK_CAP_BUTT; + gc_quartz->join_style = GDK_JOIN_MITER; +} + GType _gdk_gc_quartz_get_type (void) { @@ -167,7 +179,7 @@ _gdk_gc_quartz_get_type (void) NULL, /* class_data */ sizeof (GdkGCQuartz), 0, /* n_preallocs */ - (GInstanceInitFunc) NULL, + (GInstanceInitFunc) gdk_gc_quartz_init, }; object_type = g_type_register_static (GDK_TYPE_GC, |