nanogui: fixed: potentional buggy of 0.88pre11:nanox


Previous by date: 1 Aug 2000 02:04:59 -0000 Re: Has anybody ported perl to SA1110, Nicholas Clark
Next by date: 1 Aug 2000 02:04:59 -0000 about font configfile, liux
Previous in thread:
Next in thread: 1 Aug 2000 02:04:59 -0000 Re: fixed: potentional buggy of 0.88pre11:nanox, Morten Rolland

Subject: fixed: potentional buggy of 0.88pre11:nanox
From: ####@####.####
Date: 1 Aug 2000 02:04:59 -0000
Message-Id: <010f01bffb5d$81e10000$1b0448c0@gv.com.tw>

/*
 * Destroy windows and eventclient structures used by client.
 * Called by GsDropClient after a client has exited to clean
 * up resources.
 */
void
GsDestroyClientResources(GR_CLIENT * client)
{
 GR_WINDOW     * wp;
 GR_WINDOW     * nwp;
 GR_PIXMAP     * pp;
 GR_PIXMAP     * npp;
 GR_EVENT_CLIENT *ecp;
 GR_EVENT_CLIENT *necp;
 GR_EVENT_CLIENT *pecp = NULL;

 /* search window list, destroy windows owned by client*/
 for(wp=listwp; wp; wp=nwp) {
  nwp = wp->next;
  if (wp->owner == client) {
+#if 1//jmt: nanox0.88pre11buggy fixed
+   /*
+    * Remove eventclient structures for
+    * windows this client did own
+    */
+   ecp = wp->eventclients;
+   while (ecp) {
+    necp = ecp->next;
+    if (ecp->client == client) {
+     if (ecp == wp->eventclients)
+      wp->eventclients = ecp->next;
+     else
+      pecp->next = ecp->next;
+     free(ecp);
+    } else
+     pecp = ecp;
+    ecp = necp;
+   }
+#endif
   /* FIXME: change to call GsDestroyWindow()*/
    GsWpUnmapWindow(wp);
   GsDeliverUpdateEvent(wp, GR_UPDATE_UNMAP, 0, 0, 0, 0);
   GsWpDestroyWindow(wp);
  } else {
   /*
    * Remove eventclient structures for
    * windows this client didn't own
    */
   ecp = wp->eventclients;
   while (ecp) {
    necp = ecp->next;
    if (ecp->client == client) {
     if (ecp == wp->eventclients)
      wp->eventclients = ecp->next;
     else
      pecp->next = ecp->next;
     free(ecp);
    } else
     pecp = ecp;
    ecp = necp;
   }
  }
 }

 /* search pixmap list, destroy pixmaps owned by client*/
 for(pp=listpp; pp; pp=npp) {
  npp = pp->next;
  if (pp->owner == client)
   GrDestroyWindow(pp->id);
 }
}


Previous by date: 1 Aug 2000 02:04:59 -0000 Re: Has anybody ported perl to SA1110, Nicholas Clark
Next by date: 1 Aug 2000 02:04:59 -0000 about font configfile, liux
Previous in thread:
Next in thread: 1 Aug 2000 02:04:59 -0000 Re: fixed: potentional buggy of 0.88pre11:nanox, Morten Rolland


Powered by ezmlm-browse 0.20.