Changeset 4000 for neercs


Ignore:
Timestamp:
Nov 22, 2009, 3:50:45 PM (10 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Removed WM_CUBE, now handled though WM_FULL
  • Added eyecandy configuration option, enabling cube, window collapsing
  • Fixed window collapsing bug which didn't set correct pty index
Location:
neercs/trunk/src
Files:
5 edited

Legend:

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

    r3999 r4000  
    3636int set_socket_dir(const char *argv, struct screen_list *screen_list);
    3737int set_delay(const char *argv, struct screen_list *screen_list);
     38int set_eyecandy(const char *argv, struct screen_list *screen_list);
    3839char*  get_window_manager(struct screen_list *screen_list);
    3940char*  get_cube_duration(struct screen_list *screen_list);
     
    4546char*  get_socket_dir(struct screen_list *screen_list);
    4647char*  get_delay(struct screen_list *screen_list);
    47 
     48char*  get_eyecandy(struct screen_list *screen_list);
    4849
    4950/* Options definition and associated function pointer */
    5051struct config_line config_option[] = {
    5152    {.name = "window_manager",.set = set_window_manager, .get = get_window_manager},
     53    {.name = "eyecandy",.set = set_eyecandy, .get = get_eyecandy},
    5254    {.name = "cube_duration",.set = set_cube_duration, .get = get_window_manager},
    5355    {.name = "thumbnails",.set = set_thumbnails, .get = get_window_manager},
     
    373375    else if (IS_OPTION("card"))
    374376        screen_list->wm_type = WM_CARD;
    375     else if (IS_OPTION("cube"))
    376         screen_list->wm_type = WM_CUBE;
    377377    else
    378378    {
     
    440440}
    441441
     442int set_eyecandy(const char *argv, struct screen_list *screen_list)
     443{
     444    if (IS_OPTION("true") || IS_OPTION("1"))
     445        screen_list->eyecandy = 1;
     446    else
     447        screen_list->eyecandy = 0;
     448    return 0;
     449}
     450
    442451int set_socket_dir(const char *argv, struct screen_list *screen_list)
    443452{
     
    452461        return 0;
    453462}
    454 
    455 
    456463
    457464char* get_window_manager(struct screen_list *screen_list)
     
    467474        case WM_HSPLIT:
    468475            return "hsplit";
    469         case WM_CUBE:
    470             return "cube";
    471476        default:
    472477            return "invalid";
     
    494499}
    495500
     501char*  get_eyecandy(struct screen_list *screen_list)
     502{
     503    if(screen_list->eyecandy) return "yes";
     504    return "no";
     505}
     506
    496507char*  get_screensaver_timeout(struct screen_list *screen_list)
    497508{
  • neercs/trunk/src/effects.c

    r3998 r4000  
    141141            strcpy(text, "vsplit");
    142142            break;
    143         case WM_CUBE:
    144             strcpy(text, "cube");
    145             break;
    146143        case WM_FULL:
    147144        default:
     
    250247    screen_list->delay = 0;
    251248    rec->kill_me = 0;
    252     if (delta >= DELAY)
     249    if (delta >= DELAY || (!screen_list->eyecandy))
    253250    {
    254251        rec->kill_me = 1;
    255252        remove_screen(screen_list, screen_list->pty, 1);
    256         screen_list->pty = screen_list->prevpty;
     253        screen_list->pty = screen_list->prevpty>screen_list->count?screen_list->count:screen_list->prevpty;
    257254        screen_list->prevpty = 0;
    258255        screen_list->dont_update_coords = 0;
  • neercs/trunk/src/neercs.h

    r3999 r4000  
    2424    WM_HSPLIT,
    2525    WM_VSPLIT,
    26     WM_CUBE,
    2726
    2827    WM_MAX,
     
    175174
    176175    /* Add-ons*/
     176    int eyecandy;                /* Eye Candy */
    177177    int mini;                    /* Thumbnails */
    178178    int status;                  /* Status bar */
  • neercs/trunk/src/screen_list.c

    r3986 r4000  
    5959    screen_list->help = 0;
    6060    screen_list->status = 1;
     61    screen_list->eyecandy = 1;
    6162    screen_list->title = NULL;
    6263    screen_list->window_list = 0;
  • neercs/trunk/src/wm.c

    r3992 r4000  
    7777        break;
    7878    case WM_FULL:
    79     case WM_CUBE:
    8079    default:
    8180        update_windows_props_full(screen_list);
     
    178177        wm_refresh_card(screen_list);
    179178        break;
    180     case WM_FULL:
    181         wm_refresh_full(screen_list);
    182         break;
    183179    case WM_HSPLIT:
    184180        wm_refresh_hsplit(screen_list);
     
    187183        wm_refresh_hsplit(screen_list);
    188184        break;
    189     case WM_CUBE:
     185    case WM_FULL:
     186    default:
    190187        wm_refresh_cube(screen_list);
    191         break;
    192     default:
    193         wm_refresh_full(screen_list);
    194188        break;
    195189    }
     
    383377{
    384378    int i;
    385 
    386     if (!screen_list->cube.in_switch)
     379   
     380    if (!screen_list->cube.in_switch || !screen_list->eyecandy)
    387381    {
    388382        wm_refresh_full(screen_list);
Note: See TracChangeset for help on using the changeset viewer.