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

Diff for /src/usr.bin/tmux/popup.c between version 1.24 and 1.25

version 1.24, 2021/08/05 09:43:51 version 1.25, 2021/08/11 20:49:55
Line 33 
Line 33 
         int                       flags;          int                       flags;
   
         struct screen             s;          struct screen             s;
           struct colour_palette     palette;
         struct job               *job;          struct job               *job;
         struct input_ctx         *ictx;          struct input_ctx         *ictx;
         int                       status;          int                       status;
Line 101 
Line 102 
 {  {
         struct popup_data       *pd = ctx->arg;          struct popup_data       *pd = ctx->arg;
   
           ttyctx->palette = &pd->palette;
         ttyctx->redraw_cb = popup_redraw_cb;          ttyctx->redraw_cb = popup_redraw_cb;
         ttyctx->set_client_cb = popup_set_client_cb;          ttyctx->set_client_cb = popup_set_client_cb;
         ttyctx->arg = pd;          ttyctx->arg = pd;
Line 136 
Line 138 
         struct screen            s;          struct screen            s;
         struct screen_write_ctx  ctx;          struct screen_write_ctx  ctx;
         u_int                    i, px = pd->px, py = pd->py;          u_int                    i, px = pd->px, py = pd->py;
           struct colour_palette   *palette = &pd->palette;
           struct grid_cell         gc;
   
         screen_init(&s, pd->sx, pd->sy, 0);          screen_init(&s, pd->sx, pd->sy, 0);
         screen_write_start(&ctx, &s);          screen_write_start(&ctx, &s);
Line 150 
Line 154 
         }          }
         screen_write_stop(&ctx);          screen_write_stop(&ctx);
   
           memcpy(&gc, &grid_default_cell, sizeof gc);
           gc.fg = pd->palette.fg;
           gc.bg = pd->palette.bg;
   
         c->overlay_check = NULL;          c->overlay_check = NULL;
         for (i = 0; i < pd->sy; i++){          for (i = 0; i < pd->sy; i++)
                 tty_draw_line(tty, &s, 0, i, pd->sx, px, py + i,                  tty_draw_line(tty, &s, 0, i, pd->sx, px, py + i, &gc, palette);
                     &grid_default_cell, NULL);  
         }  
         c->overlay_check = popup_check_cb;          c->overlay_check = popup_check_cb;
 }  }
   
Line 180 
Line 186 
         input_free(pd->ictx);          input_free(pd->ictx);
   
         screen_free(&pd->s);          screen_free(&pd->s);
           colour_palette_free(&pd->palette);
         free(pd);          free(pd);
 }  }
   
Line 389 
Line 396 
         pd->status = 128 + SIGHUP;          pd->status = 128 + SIGHUP;
   
         screen_init(&pd->s, sx - 2, sy - 2, 0);          screen_init(&pd->s, sx - 2, sy - 2, 0);
           colour_palette_init(&pd->palette);
           colour_palette_from_option(&pd->palette, global_w_options);
   
         pd->px = px;          pd->px = px;
         pd->py = py;          pd->py = py;
Line 403 
Line 412 
         pd->job = job_run(shellcmd, argc, argv, s, cwd,          pd->job = job_run(shellcmd, argc, argv, s, cwd,
             popup_job_update_cb, popup_job_complete_cb, NULL, pd,              popup_job_update_cb, popup_job_complete_cb, NULL, pd,
             JOB_NOWAIT|JOB_PTY|JOB_KEEPWRITE, pd->sx - 2, pd->sy - 2);              JOB_NOWAIT|JOB_PTY|JOB_KEEPWRITE, pd->sx - 2, pd->sy - 2);
         pd->ictx = input_init(NULL, job_get_event(pd->job));          pd->ictx = input_init(NULL, job_get_event(pd->job), &pd->palette);
   
         server_client_set_overlay(c, 0, popup_check_cb, popup_mode_cb,          server_client_set_overlay(c, 0, popup_check_cb, popup_mode_cb,
             popup_draw_cb, popup_key_cb, popup_free_cb, popup_resize_cb, pd);              popup_draw_cb, popup_key_cb, popup_free_cb, popup_resize_cb, pd);

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25