diff -Naur gfsview-0.4/view/gfkgl.c gfsview-0.4-new/view/gfkgl.c --- gfsview-0.4/view/gfkgl.c 2005-10-11 22:55:13.000000000 +0000 +++ gfsview-0.4-new/view/gfkgl.c 2006-02-06 20:07:45.000000000 +0000 @@ -2376,16 +2376,21 @@ static gboolean client_event (GtkWidget * view, GdkEventClient * msg) { - FILE * fp; - GfsGl2PSParams * p; - - GFK_GL_UNPACK_MSG (msg, fp, p); - gfs_gl2ps (p, fp, "", view); - if (fp == stdout || fp == stderr) - fflush (fp); - else - fclose (fp); - g_free (p); + gchar * name = gdk_atom_name (msg->message_type); + + if (!strcmp (name, "GFS_SAVE_EVENT")) { + FILE * fp; + GfsGl2PSParams * p; + + GFK_GL_UNPACK_MSG (msg, fp, p); + gfs_gl2ps (p, fp, "", view); + if (fp == stdout || fp == stderr) + fflush (fp); + else + fclose (fp); + g_free (p); + } + g_free (name); return TRUE; }