- dBug(("__panels_overlapped %s %s", USER_PTR(pan1->user), USER_PTR(pan2->user)));
- /* pan1 intersects with pan2 ? */
- if( (((pan1->wstarty >= pan2->wstarty) && (pan1->wstarty < pan2->wendy)) ||
- ((pan2->wstarty >= pan1->wstarty) && (pan2->wstarty < pan1->wendy))) &&
- (((pan1->wstartx >= pan2->wstartx) && (pan1->wstartx < pan2->wendx)) ||
- ((pan2->wstartx >= pan1->wstartx) && (pan2->wstartx < pan1->wendx)))
- ) return(TRUE);
- else {
- dBug((" no"));
- return(FALSE);
- }
-}
-
-/*+-------------------------------------------------------------------------
- _nc_free_obscure(pan)
---------------------------------------------------------------------------*/
-void
-_nc_free_obscure(PANEL *pan)
-{
- PANELCONS *tobs = pan->obscure; /* "this" one */
- PANELCONS *nobs; /* "next" one */
-
- while(tobs)
- {
- nobs = tobs->above;
- free((char *)tobs);
- tobs = nobs;
- }
- pan->obscure = (PANELCONS *)0;
-}
-
-/*+-------------------------------------------------------------------------
- __override(pan,show)
---------------------------------------------------------------------------*/
-void
-_nc_override(const PANEL *pan, int show)
-{
- int y;
- PANEL *pan2;
- PANELCONS *tobs = pan->obscure; /* "this" one */
-
- dBug(("_nc_override %s,%d", USER_PTR(pan->user),show));
-
- switch (show)
- {
- case P_TOUCH:
- Touchpan(pan);
- /* The following while loop will now mark all panel window lines
- * obscured by use or obscuring us as touched, so they will be
- * updated.
- */
- break;
- case P_UPDATE:
- while(tobs && (tobs->pan != pan))
- tobs = tobs->above;
- /* The next loop will now only go through the panels obscuring pan;
- * it updates all the lines in the obscuring panels in sync. with
- * the lines touched in pan itself. This is called in update_panels()
- * in a loop from the bottom_panel to the top_panel, resulting in
- * the desired update effect.
- */
- break;
- default:
- return;
- }
-
- while(tobs)
- {
- if((pan2 = tobs->pan) != pan) {
- dBug(("test obs pan=%s pan2=%s", USER_PTR(pan->user), USER_PTR(pan2->user)));
- for(y = pan->wstarty; y < pan->wendy; y++) {
- if( (y >= pan2->wstarty) && (y < pan2->wendy) &&
- ((is_linetouched(pan->win,y - pan->wstarty) == TRUE)) )
- Touchline(pan2,y - pan2->wstarty,1);
- }
- }
- tobs = tobs->above;
- }