src/mnwevent.c
/************************************************************************/
/* Find_window                                                          */
/* Find the wif corresponding to the Xwindow. This function also places */
/* the found wif at the head of the chain. The rationale for this is    */
/* that a window that has gotten signals is likely to be the target of  */
/* the next signal also. The next time we look for this wif we'll find  */
/* at the head of the chain. (This is bubblesort)                       */
/*                                                                      */
/************************************************************************/
Find_window
Find the wif corresponding to the Xwindow. This function also places
the found wif at the head of the chain. The rationale for this is
that a window that has gotten signals is likely to be the target of
the next signal also. The next time we look for this wif we'll find
at the head of the chain. (This is bubblesort)
Find_window Find the wif corresponding to the Xwindow . This function also places the found wif at the head of the chain . The rationale for this is that a window that has gotten signals is likely to be the target of the next signal also . The next time we look for this wif we ' ll find at the head of the chain . ( This is bubblesort )
WindowInterface Find_window(DspInterface dspif, Window Xwindow)
{
  WindowInterface curr, prev;
  if (dspif->CreatedWifs == (WindowInterface)NULL) return (NIL);
  if (dspif->CreatedWifs->blackframe == Xwindow) return (dspif->CreatedWifs);
  for (prev = dspif->CreatedWifs, curr = prev->next;
       ((curr != (WindowInterface)NULL) && (curr->blackframe != Xwindow));
       curr = curr->next, prev = prev->next) {}
  if (curr == (WindowInterface)NULL) return (NIL); 
  prev->next = curr->next;
  curr->next = dspif->CreatedWifs;
  dspif->CreatedWifs = curr;
  return (curr);
}
WindowInterface Find_window ( DspInterface dspif , Window Xwindow ) { WindowInterface curr , prev ; if ( dspif -> CreatedWifs == ( WindowInterface ) NULL ) return ( NIL ) ; if ( dspif -> CreatedWifs -> blackframe == Xwindow ) return ( dspif -> CreatedWifs ) ; for ( prev = dspif -> CreatedWifs , curr = prev -> next ; ( ( curr != ( WindowInterface ) NULL ) && ( curr -> blackframe != Xwindow ) ) ; curr = curr -> next , prev = prev -> next ) { } if ( curr == ( WindowInterface ) NULL ) return ( NIL ) ; prev -> next = curr -> next ; curr -> next = dspif -> CreatedWifs ; dspif -> CreatedWifs = curr ; return ( curr ) ; }
Find_window
Find the wif corresponding to the Xwindow.
Find_window Find the wif corresponding to the Xwindow .
/* Find the wif we are interested in. */ /* wif not found */ /* Bubble curr to the head of the list */