Ignore:
Timestamp:
Mar 8, 2006, 8:41:53 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Fixed async issues between the driver and libcaca when resizing windows, and simplified the handle_resize() API. Still can be polished.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/driver_slang.c

    r551 r553  
    237237}
    238238
    239 static void slang_handle_resize(caca_t *kk, unsigned int *new_width,
    240                                             unsigned int *new_height)
     239static void slang_handle_resize(caca_t *kk)
    241240{
    242241    SLtt_get_screen_size();
    243     *new_width = SLtt_Screen_Cols;
    244     *new_height = SLtt_Screen_Rows;
    245 
    246     if(*new_width != kk->qq->width || *new_height != kk->qq->height)
     242    kk->resize.w = SLtt_Screen_Cols;
     243    kk->resize.h = SLtt_Screen_Rows;
     244
     245    if(kk->resize.w != kk->qq->width || kk->resize.h != kk->qq->height)
    247246        SLsmg_reinit_smg();
    248247}
     
    252251    unsigned int event;
    253252    int intkey;
    254 
    255     if(kk->resize_event)
    256     {
    257         kk->resize_event = 0;
    258         kk->resize = 1;
    259         return CACA_EVENT_RESIZE;
    260     }
    261253
    262254    if(!SLang_input_pending(0))
     
    380372static RETSIGTYPE sigwinch_handler(int sig)
    381373{
    382     sigwinch_kk->resize_event = 1;
     374    sigwinch_kk->resize.resized = 1;
    383375
    384376    signal(SIGWINCH, sigwinch_handler);;
Note: See TracChangeset for help on using the changeset viewer.