Changeset 2368
- Timestamp:
- 06/13/08 14:52:48 (5 years ago)
- Location:
- neercs/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
neercs/trunk/src/main.c
r2367 r2368 91 91 screen_list->height = cucul_get_canvas_height(cv) - ((mini*6) + (status)); 92 92 screen_list->wm_type = WM_CARD; 93 screen_list->in_bell = 0; 93 94 94 95 for(i = 0; i < nt; i++) … … 189 190 unsigned long int bytes; 190 191 191 bytes = import_term(screen_list ->screen[i], screen_list->screen[i]->buf, screen_list->screen[i]->total);192 bytes = import_term(screen_list, screen_list->screen[i], screen_list->screen[i]->buf, screen_list->screen[i]->total); 192 193 193 194 if(bytes > 0) … … 286 287 287 288 /* Refresh screen */ 288 if(refresh )289 if(refresh || screen_list->in_bell) 289 290 { 290 291 refresh = 0; … … 302 303 for(i = screen_list->count - 1; i >=0; i--) 303 304 { 304 305 305 if(i!=pty) 306 306 { … … 314 314 screen_list->screen[i]->w + 2, 315 315 screen_list->screen[i]->h + 2); 316 317 316 } 318 317 … … 324 323 screen_list->screen[pty]->y, 325 324 screen_list->screen[pty]->cv, NULL); 325 if(screen_list->screen[pty]->bell) 326 { 327 cucul_set_color_ansi(cv, CUCUL_RED, CUCUL_BLACK); 328 screen_list->screen[pty]->bell = 0; 329 screen_list->in_bell--; 330 } 331 else 332 { 333 cucul_set_color_ansi(cv, CUCUL_LIGHTGREEN, CUCUL_BLACK); 334 } 326 335 cucul_draw_cp437_box(cv, 327 336 screen_list->screen[pty]->x - 1, … … 436 445 s->h = h+1; 437 446 s->fd = create_pty(command, w, h); 447 s->bell = 0; 448 438 449 if(s->fd < 0) 439 450 { -
neercs/trunk/src/neercs.h
r2367 r2368 42 42 unsigned char *buf; 43 43 long int total; 44 int bell; 44 45 45 46 int x, y; … … 50 51 { 51 52 int wm_type; 53 int in_bell; 52 54 int count; 53 55 int width, height; … … 57 59 58 60 59 long int import_term(struct screen *sc, void const *data, unsigned int size);61 long int import_term(struct screen_list *screen_list, struct screen *sc, void const *data, unsigned int size); 60 62 int set_tty_size(int fd, unsigned int w, unsigned int h); 61 63 -
neercs/trunk/src/term.c
r1834 r2368 26 26 unsigned int, unsigned int const *); 27 27 28 long int import_term(struct screen *sc, void const *data, unsigned int size)28 long int import_term(struct screen_list *screen_list, struct screen *sc, void const *data, unsigned int size) 29 29 { 30 30 unsigned char const *buffer = (unsigned char const*)data; … … 68 68 x = 0; 69 69 y++; 70 } 71 else if(buffer[i] == '\a') 72 { 73 screen_list->in_bell = 10; 74 sc->bell = 10; 70 75 } 71 76
Note: See TracChangeset
for help on using the changeset viewer.
