diff options
author | Owen Taylor <otaylor@src.gnome.org> | 1997-12-05 04:25:52 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1997-12-05 04:25:52 +0000 |
commit | 28de9c69b311fc2a2ffb1e6f150b76062366a6fd (patch) | |
tree | 7daf4be3200b939f230825c8ca40eee6b213d1a1 /gdk/gdkgc.c | |
parent | ef3f373172065c714fef8715e8cfc8656f8e7fd4 (diff) | |
download | gtk+-28de9c69b311fc2a2ffb1e6f150b76062366a6fd.tar.gz |
Ignore gdk_gc_set_font if font is a fontset. (Actually, gdk_gc_set_font
is completely useless now...)
-owt
Diffstat (limited to 'gdk/gdkgc.c')
-rw-r--r-- | gdk/gdkgc.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gdk/gdkgc.c b/gdk/gdkgc.c index 3dc11ce6cc..8ee9fdc359 100644 --- a/gdk/gdkgc.c +++ b/gdk/gdkgc.c @@ -371,11 +371,14 @@ gdk_gc_set_font (GdkGC *gc, g_return_if_fail (gc != NULL); g_return_if_fail (font != NULL); - gc_private = (GdkGCPrivate*) gc; - font_private = (GdkFontPrivate*) font; - - XSetFont (gc_private->xdisplay, gc_private->xgc, - ((XFontStruct *) font_private->xfont)->fid); + if (font->type == GDK_FONT_FONT) + { + gc_private = (GdkGCPrivate*) gc; + font_private = (GdkFontPrivate*) font; + + XSetFont (gc_private->xdisplay, gc_private->xgc, + ((XFontStruct *) font_private->xfont)->fid); + } } void |