http://ftp.nluug.nl/pub/os/Linux/distr/pardusrepo/sources/xscreensaver-5.02.tar.gz
[xscreensaver] / driver / splash.c
index 52c21ad6c0e21881df9b1c0e0bf5a5dfed72007e..ead36d7c1c38179eefc5377dc62650bf65b79fb3 100644 (file)
@@ -87,10 +87,7 @@ draw_shaded_rectangle (Display *dpy, Window window,
 int
 string_width (XFontStruct *font, char *s)
 {
-  int direction, ascent, descent;
-  XCharStruct overall;
-  XTextExtents (font, s, strlen(s), &direction, &ascent, &descent, &overall);
-  return overall.width;
+  return XTextWidth(font, s, strlen(s));
 }