+ /* the logo
+ */
+ XSetForeground (si->dpy, gc1, pw->logo_foreground);
+ XSetForeground (si->dpy, gc2, pw->logo_background);
+
+ x1 = pw->shadow_width * 3;
+ y1 = pw->shadow_width * 3;
+ x2 = pw->logo_width - (pw->shadow_width * 6);
+ y2 = pw->logo_height - (pw->shadow_width * 6);
+
+ XFillRectangle (si->dpy, si->passwd_dialog, gc2, x1, y1, x2, y2);
+ skull (si->dpy, si->passwd_dialog, gc1, gc2,
+ x1 + pw->shadow_width, y1 + pw->shadow_width,
+ x2 - (pw->shadow_width * 2), y2 - (pw->shadow_width * 2));
+
+ /* The thermometer
+ */
+ pw->thermo_field_x = pw->logo_width + pw->shadow_width;
+ pw->thermo_field_y = pw->shadow_width * 3;
+ pw->thermo_field_height = pw->height - (pw->shadow_width * 6);
+
+ /* Solid border inside the logo box. */
+ XSetForeground (si->dpy, gc1, pw->foreground);
+ XDrawRectangle (si->dpy, si->passwd_dialog, gc1, x1, y1, x2-1, y2-1);
+
+ /* The shadow around the logo
+ */
+ draw_shaded_rectangle (si->dpy, si->passwd_dialog,
+ pw->shadow_width * 2,
+ pw->shadow_width * 2,
+ pw->logo_width - (pw->shadow_width * 4),
+ pw->logo_height - (pw->shadow_width * 4),
+ pw->shadow_width,
+ pw->shadow_bottom, pw->shadow_top);
+
+ /* The shadow around the thermometer
+ */
+ draw_shaded_rectangle (si->dpy, si->passwd_dialog,
+ pw->logo_width,
+ pw->shadow_width * 2,
+ pw->thermo_width + (pw->shadow_width * 2),
+ pw->height - (pw->shadow_width * 4),
+ pw->shadow_width,
+ pw->shadow_bottom, pw->shadow_top);
+
+ /* Solid border inside the thermometer. */
+ XSetForeground (si->dpy, gc1, pw->foreground);
+ XDrawRectangle (si->dpy, si->passwd_dialog, gc1,
+ pw->logo_width + pw->shadow_width,
+ pw->shadow_width * 3,
+ pw->thermo_width - 1,
+ pw->height - (pw->shadow_width * 6) - 1);
+
+ /* The shadow around the whole window
+ */
+ draw_shaded_rectangle (si->dpy, si->passwd_dialog,
+ 0, 0, pw->width, pw->height, pw->shadow_width,
+ pw->shadow_top, pw->shadow_bottom);
+
+ XFreeGC (si->dpy, gc1);
+ XFreeGC (si->dpy, gc2);
+
+ update_passwd_window (si, pw->passwd_string, pw->ratio);
+}
+
+
+static void
+update_passwd_window (saver_info *si, const char *printed_passwd, float ratio)
+{
+ passwd_dialog_data *pw = si->pw_data;
+ XGCValues gcv;
+ GC gc1, gc2;
+ int x, y;
+ XRectangle rects[1];
+
+ pw->ratio = ratio;
+ gcv.foreground = pw->passwd_foreground;
+ gcv.font = pw->passwd_font->fid;
+ gc1 = XCreateGC (si->dpy, si->passwd_dialog, GCForeground|GCFont, &gcv);
+ gcv.foreground = pw->passwd_background;
+ gc2 = XCreateGC (si->dpy, si->passwd_dialog, GCForeground, &gcv);
+
+ if (printed_passwd)