X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=driver%2Fsplash.c;h=56f66daf5c69f38c62203aab1f4657b299f29153;hb=488f2fa8fbdbc77e91a70da2962d73af49e6cace;hp=52c21ad6c0e21881df9b1c0e0bf5a5dfed72007e;hpb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439;p=xscreensaver diff --git a/driver/splash.c b/driver/splash.c index 52c21ad6..56f66daf 100644 --- a/driver/splash.c +++ b/driver/splash.c @@ -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)); } @@ -417,7 +414,9 @@ make_splash_dialog (saver_info *si) attrmask, &attrs); XSetWindowBackground (si->dpy, si->splash_dialog, sp->background); - sp->logo_pixmap = xscreensaver_logo (ssi->screen, ssi->current_visual, + sp->logo_pixmap = xscreensaver_logo (ssi->screen, + /* same visual as si->splash_dialog */ + DefaultVisualOfScreen (ssi->screen), si->splash_dialog, cmap, sp->background, &sp->logo_pixels, &sp->logo_npixels,