Changeset 2500


Ignore:
Timestamp:
06/28/08 16:50:59 (5 years ago)
Author:
jylam
Message:
  • Added an autolock timeout (autolock_timeout = N in configuration file)
Location:
neercs/trunk/src
Files:
4 edited

Legend:

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

    r2481 r2500  
    283283            /* if timeout is 0, set it to 0xFFFFFFFFFFFFFFFF */ 
    284284            if(!screen_list->screensaver_timeout) screen_list->screensaver_timeout-=1; 
     285        }  else if(IS_TOKEN("autolock_timeout")) 
     286        { 
     287            screen_list->autolock_timeout = atoi(option->value) * 1000000; 
     288            /* if timeout is 0, set it to 0xFFFFFFFFFFFFFFFF */ 
     289            if(!screen_list->autolock_timeout) screen_list->autolock_timeout-=1; 
    285290        } else if(IS_TOKEN("socket_dir")) 
    286291        { 
  • neercs/trunk/src/main.c

    r2497 r2500  
    119119    } 
    120120 
     121 
    121122    screen_list->recurrent_list = (struct recurrent_list*) malloc(sizeof(struct recurrent_list)); 
    122123    screen_list->recurrent_list->recurrent = (struct recurrent**) malloc(sizeof(struct recurrent*)); 
     
    304305 
    305306    last_key_time = get_us(); 
    306  
    307307 
    308308    for(;;) 
     
    420420 
    421421            } 
    422  
    423422            if((get_us() - last_key_time > screen_list->screensaver_timeout)) 
    424423            { 
     
    431430                refresh = 1; 
    432431            } 
     432 
     433            if((get_us() - last_key_time > screen_list->autolock_timeout)) 
     434            { 
     435                screen_list->locked = 1; 
     436                refresh = 1; 
     437            } 
     438 
    433439        } 
    434440 
     
    542548    screen_list->default_shell = NULL; 
    543549 
     550    screen_list->autolock_timeout = -1; 
     551 
     552 
    544553    screen_list->recurrent_list = NULL; 
    545554    screen_list->cv = NULL; 
  • neercs/trunk/src/neercs.h

    r2495 r2500  
    8181    int locked; 
    8282    int lock_offset; 
     83    long long unsigned int  autolock_timeout; 
    8384    char lockpass[1024]; 
    8485    char lockmsg[1024]; 
  • neercs/trunk/src/neercsrc

    r2486 r2500  
    1212window_manager = hsplit   ; full card  hsplit vsplit 
    1313status_bar = true         ; Activate status bar 
     14autolock_timeout = 120    ; Lock session after 100 seconds 
    1415 
    1516[eyecandy]                ; Not-that-useful stuff 
Note: See TracChangeset for help on using the changeset viewer.