-/* xscreensaver, Copyright (c) 1991-2001 Jamie Zawinski <jwz@netscape.com>
+/* xscreensaver, Copyright (c) 1991-2005 Jamie Zawinski <jwz@netscape.com>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
attrmask, &attrs);
XSetWindowBackground (si->dpy, si->splash_dialog, sp->background);
- sp->logo_pixmap = xscreensaver_logo (si->dpy, si->splash_dialog, cmap,
+ sp->logo_pixmap = xscreensaver_logo (ssi->screen, ssi->current_visual,
+ si->splash_dialog, cmap,
sp->background,
&sp->logo_pixels, &sp->logo_npixels,
0, True);
if (sp->heading_label) free (sp->heading_label);
if (sp->body_label) free (sp->body_label);
+ if (sp->body2_label) free (sp->body2_label);
if (sp->demo_label) free (sp->demo_label);
#ifdef PREFS_BUTTON
if (sp->prefs_label) free (sp->prefs_label);
if (sp->logo_pixmap)
XFreePixmap (si->dpy, sp->logo_pixmap);
- if (sp->logo_npixels && sp->logo_pixels)
- XFreeColors (si->dpy, cmap, sp->logo_pixels, sp->logo_npixels, 0L);
if (sp->logo_pixels)
- free (sp->logo_pixels);
+ {
+ if (sp->logo_npixels)
+ XFreeColors (si->dpy, cmap, sp->logo_pixels, sp->logo_npixels, 0L);
+ free (sp->logo_pixels);
+ sp->logo_pixels = 0;
+ sp->logo_npixels = 0;
+ }
memset (sp, 0, sizeof(*sp));
free (sp);
-
si->sp_data = 0;
}
if (which && sp->pressed == which)
{
destroy_splash_window (si);
+ sp = si->sp_data;
switch (which)
{
case 1: do_demo (si); break;
/* click and release on the window but not in a button:
treat that as "dismiss the splash dialog." */
destroy_splash_window (si);
+ sp = si->sp_data;
}
- sp->pressed = 0;
+ if (sp) sp->pressed = 0;
update_splash_window (si);
}
break;
}
help_command = (char *) malloc (strlen (p->load_url_command) +
- (strlen (p->help_url) * 2) + 10);
- sprintf (help_command, p->load_url_command, p->help_url, p->help_url);
+ (strlen (p->help_url) * 4) + 10);
+ sprintf (help_command, p->load_url_command,
+ p->help_url, p->help_url, p->help_url, p->help_url);
fork_and_exec (si, help_command, "URL-loading");
free (help_command);
}