MIKE@cisco.nosc.mil (06/15/89)
I have what I hope is a simple question for some Sunview expert. I'm trying to implement a button which will perform an 'Exit Suntools' function. I got the source from Suntools.c and tried to copy the code fragment that it uses, quit() { int windowfd; int i; struct pixwin *pixwin; /* destroy all windows in demo and logout this stuff copied from suntools.c */ windowfd = window_get(base_frame0,WIN_FD); /* get current window fd */ win_screenget(windowfd,&rootscreen); /* get root screen attributes */ rootfd = open(rootscreen.scr_rootname); /* get root screen fd */ win_screendestroy(rootfd); /* close all windows */ /* lock screen before clear so the frame buffer is not clobbered while the cursor is moving */ (void)pw_lock(pixwin,&rootscreen.scr_rect); /* Clear available plane groups */ for (i = 0; i < PIX_MAX_PLANE_GROUPS; i++) { if (pixwin->pw_clipdata->pwcd_plane_groups_available[i]) { /* Write to all plane groups */ pr_set_planes(pixwin->pw_pixrect, i, PIX_ALL_PLANES); /* Clear screen */ (void)pr_rop(pixwin->pw_pixrect, rootscreen.scr_rect.r_left, rootscreen.scr_rect.r_top, rootscreen.scr_rect.r_width, rootscreen.scr_rect.r_height, PIX_CLR, (Pixrect *)0, 0, 0); /* Reset previous colormap */ (void)pr_putcolormap(pixwin->pw_pixrect, 0, 256, red, green, blue); } } (void)pw_unlock(pixwin); exit(0); It kinda works, all processes in all the active windows seem to terminate, but the screen does not clear, the windows in the top two-thirds or so of the screen still display. If I log back in and clear the screen things seem o.k. Any help appreciated. Mike Pawka NOSC San Diego, CA mike@cisco.nosc.mil