Changeset 2363


Ignore:
Timestamp:
06/12/08 15:50:39 (5 years ago)
Author:
jylam
Message:
  • Added Cards window manager
  • Thumbnails are now black instead of white at neercs start
Location:
neercs/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/main.c

    r2362 r2363  
    8282    screen_list->screen = (struct screen**) malloc(sizeof(sizeof(struct screen*))); 
    8383    screen_list->count = 0; 
    84     screen_list->wm_type = WM_VSPLIT; 
    8584    screen_list->width  = cucul_get_canvas_width(cv); 
    8685    screen_list->height = cucul_get_canvas_height(cv) - (mini*6); 
    87  
     86    screen_list->wm_type = WM_CARD; 
    8887 
    8988    for(i = 0; i < nt; i++) 
     
    289288            cucul_set_color_ansi(cv, CUCUL_LIGHTRED, CUCUL_BLACK); 
    290289 
    291             for(i = 0; i < screen_list->count; i++) 
     290            for(i = screen_list->count - 1; i >=0; i--) 
    292291            { 
    293292 
     
    298297                               screen_list->screen[i]->y, 
    299298                               screen_list->screen[i]->cv, NULL); 
     299                    cucul_draw_cp437_box(cv, 
     300                                         screen_list->screen[i]->x - 1, 
     301                                         screen_list->screen[i]->y - 1, 
     302                                         screen_list->screen[i]->w + 2, 
     303                                         screen_list->screen[i]->h + 2); 
     304 
    300305                } 
    301                 cucul_draw_cp437_box(cv, 
    302                                      screen_list->screen[i]->x - 1, 
    303                                      screen_list->screen[i]->y - 1, 
    304                                      screen_list->screen[i]->w + 2, 
    305                                      screen_list->screen[i]->h + 2); 
    306306 
    307307            } 
     
    312312                       screen_list->screen[pty]->y, 
    313313                   screen_list->screen[pty]->cv, NULL); 
     314            cucul_draw_cp437_box(cv, 
     315                                 screen_list->screen[pty]->x - 1, 
     316                                 screen_list->screen[pty]->y - 1, 
     317                                 screen_list->screen[pty]->w + 2, 
     318                                 screen_list->screen[pty]->h + 2); 
     319 
    314320            cucul_gotoxy(cv, 
    315321                         screen_list->screen[pty]->x + cucul_get_cursor_x(screen_list->screen[pty]->cv), 
     
    400406 
    401407    s->cv = cucul_create_canvas(w, h); 
     408    cucul_set_color_ansi(s->cv, CUCUL_BLACK, CUCUL_BLACK); 
     409    cucul_clear_canvas(s->cv); 
    402410    s->init = 0; 
    403411 
  • neercs/trunk/src/wm.c

    r2362 r2363  
    101101    int h = screen_list->height - 2; 
    102102 
    103  
    104103    for(i = 0; i < screen_list->count; i++) 
    105104    { 
     
    115114void update_windows_props_cards(cucul_canvas_t *cv, struct screen_list *screen_list, int pty) 
    116115{ 
    117 #if 0 
    118116    int i; 
    119     int xtab, ytab; 
    120  
    121     xtab = cucul_get_canvas_width(cv) screen_list->count 
    122  
    123  
    124     cucul_set_color_ansi(cv, CUCUL_DEFAULT, CUCUL_DEFAULT); 
    125     cucul_clear_canvas(cv); 
    126     cucul_set_color_ansi(cv, CUCUL_LIGHTRED, CUCUL_BLACK); 
     117    int w = (screen_list->width  - screen_list->count) - 3; 
     118    int h = (screen_list->height - screen_list->count) - 4; 
     119    int x = (screen_list->width  - w) - (3*screen_list->count) + 4; 
     120    int y = 2 + (1*screen_list->count); 
    127121 
    128122    for(i = 0; i < screen_list->count; i++) 
    129123    { 
    130         int n = screen_list->count; 
    131         if(screen_list->screen[i]->fd < 0) 
    132             continue; 
    133         int j = (pty + n - 1 - i) % n; 
    134         cucul_blit(cv, (n - 1 - j) * XTAB + 1, 
    135                    j * YTAB + 1, screen_list->screen[j]->cv, NULL); 
    136         cucul_draw_cp437_box(cv, (n - 1 - j) * XTAB, j * YTAB, 
    137                              screen_list->screen[j]->w+1, 
    138                              screen_list->screen[j]->h+1); 
    139         /* Set cursor to the correct position */ 
    140         if(i == n - 1) 
    141             cucul_gotoxy(cv, (n - 1 - j) * XTAB + 1 
    142                          + cucul_get_cursor_x(screen_list->screen[j]->cv), 
    143                          j * YTAB + 1 
    144                          + cucul_get_cursor_y(screen_list->screen[j]->cv)); 
     124        screen_list->screen[i]->x = x; 
     125        screen_list->screen[i]->y = y; 
     126 
     127        resize_screen(screen_list->screen[i], 
     128                      w, h); 
     129        x += 3; 
     130        y--; 
     131 
    145132    } 
    146  
    147 #endif 
    148133} 
    149134 
Note: See TracChangeset for help on using the changeset viewer.