[BACK]Return to server-client.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/server-client.c between version 1.325 and 1.326

version 1.325, 2020/04/18 07:32:53 version 1.326, 2020/04/18 21:35:32
Line 1370 
Line 1370 
                                 if (resize)                                  if (resize)
                                         server_client_check_resize(wp);                                          server_client_check_resize(wp);
                         }                          }
                           wp->flags &= ~PANE_REDRAW;
                 }                  }
                 check_window_name(w);                  check_window_name(w);
         }          }
Line 1679 
Line 1680 
 {  {
         struct session          *s = c->session;          struct session          *s = c->session;
         struct tty              *tty = &c->tty;          struct tty              *tty = &c->tty;
           struct window           *w = c->session->curw->window;
         struct window_pane      *wp;          struct window_pane      *wp;
         int                      needed, flags, mode = tty->mode, new_flags = 0;          int                      needed, flags, mode = tty->mode, new_flags = 0;
           int                      redraw;
           u_int                    bit = 0;
         struct timeval           tv = { .tv_usec = 1000 };          struct timeval           tv = { .tv_usec = 1000 };
         static struct event      ev;          static struct event      ev;
         size_t                   left;          size_t                   left;
Line 1705 
Line 1709 
         if (c->flags & CLIENT_ALLREDRAWFLAGS)          if (c->flags & CLIENT_ALLREDRAWFLAGS)
                 needed = 1;                  needed = 1;
         else {          else {
                 TAILQ_FOREACH(wp, &c->session->curw->window->panes, entry) {                  TAILQ_FOREACH(wp, &w->panes, entry) {
                         if (wp->flags & PANE_REDRAW) {                          if (wp->flags & PANE_REDRAW) {
                                 needed = 1;                                  needed = 1;
                                 break;                                  break;
Line 1722 
Line 1726 
                         log_debug("redraw timer started");                          log_debug("redraw timer started");
                         evtimer_add(&ev, &tv);                          evtimer_add(&ev, &tv);
                 }                  }
                   if (new_flags & CLIENT_REDRAWPANES) {
                           c->redraw_panes = 0;
                           TAILQ_FOREACH(wp, &w->panes, entry) {
                                   if (wp->flags & PANE_REDRAW)
                                           c->redraw_panes |= (1 << bit);
                                   if (++bit == 64) {
                                           /*
                                            * If more that 64 panes, give up and
                                            * just redraw the window.
                                            */
                                           new_flags &= CLIENT_REDRAWPANES;
                                           new_flags |= CLIENT_REDRAWWINDOW;
                                           break;
                                   }
                           }
                   }
                 c->flags |= new_flags;                  c->flags |= new_flags;
                 return;                  return;
         } else if (needed)          } else if (needed)
                 log_debug("%s: redraw needed", c->name);                  log_debug("%s: redraw needed", c->name);
   
         flags = tty->flags & (TTY_BLOCK|TTY_FREEZE|TTY_NOCURSOR);          flags = tty->flags & (TTY_BLOCK|TTY_FREEZE|TTY_NOCURSOR);
         tty->flags = (tty->flags & ~(TTY_BLOCK|TTY_FREEZE)) | TTY_NOCURSOR;          tty->flags = (tty->flags & ~(TTY_BLOCK|TTY_FREEZE))|TTY_NOCURSOR;
   
         if (~c->flags & CLIENT_REDRAWWINDOW) {          if (~c->flags & CLIENT_REDRAWWINDOW) {
                 /*                  /*
                  * If not redrawing the entire window, check whether each pane                   * If not redrawing the entire window, check whether each pane
                  * needs to be redrawn.                   * needs to be redrawn.
                  */                   */
                 TAILQ_FOREACH(wp, &c->session->curw->window->panes, entry) {                  TAILQ_FOREACH(wp, &w->panes, entry) {
                         if (wp->flags & PANE_REDRAW) {                          redraw = 0;
                                 log_debug("%s: redrawing pane %%%u", __func__, wp->id);                          if (wp->flags & PANE_REDRAW)
                                 tty_update_mode(tty, mode, NULL);                                  redraw = 1;
                                 screen_redraw_pane(c, wp);                          else if (c->flags & CLIENT_REDRAWPANES)
                         }                                  redraw = !!(c->redraw_panes & (1 << bit));
                           if (!redraw)
                                   continue;
                           log_debug("%s: redrawing pane %%%u", __func__, wp->id);
                           tty_update_mode(tty, mode, NULL);
                           screen_redraw_pane(c, wp);
                 }                  }
                 c->flags &= ~CLIENT_REDRAWPANES;                  c->flags &= ~CLIENT_REDRAWPANES;
         }          }
Line 1752 
Line 1777 
                 screen_redraw_screen(c);                  screen_redraw_screen(c);
         }          }
   
         tty->flags = (tty->flags & ~TTY_NOCURSOR) | (flags & TTY_NOCURSOR);          tty->flags = (tty->flags & ~TTY_NOCURSOR)|(flags & TTY_NOCURSOR);
         tty_update_mode(tty, mode, NULL);          tty_update_mode(tty, mode, NULL);
         tty->flags = (tty->flags & ~(TTY_BLOCK|TTY_FREEZE|TTY_NOCURSOR)) | flags;          tty->flags = (tty->flags & ~(TTY_BLOCK|TTY_FREEZE|TTY_NOCURSOR))|flags;
   
         c->flags &= ~(CLIENT_ALLREDRAWFLAGS|CLIENT_STATUSFORCE);          c->flags &= ~(CLIENT_ALLREDRAWFLAGS|CLIENT_STATUSFORCE);
   

Legend:
Removed from v.1.325  
changed lines
  Added in v.1.326