Ignore:
Timestamp:
Mar 8, 2006, 8:41:53 PM (15 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/graphics.c

    r550 r553  
    3636 * Local functions
    3737 */
    38 static void caca_handle_resize(caca_t *kk);
     38void _caca_handle_resize(caca_t *kk);
    3939
    4040/** \brief Set the window title.
     
    131131    kk->drv.display(kk);
    132132
    133     /* FIXME handle this somewhere else */
    134     if(kk->resize)
     133    /* Once the display is finished, we can ack resizes */
     134    if(kk->resize.resized)
    135135    {
    136         kk->resize = 0;
    137         caca_handle_resize(kk);
     136        kk->resize.resized = 0;
     137        _caca_handle_resize(kk);
    138138    }
    139139
     
    161161 */
    162162
    163 static void caca_handle_resize(caca_t *kk)
     163void _caca_handle_resize(caca_t *kk)
    164164{
    165     unsigned int new_width, new_height;
    166 
    167     kk->drv.handle_resize(kk, &new_width, &new_height);
     165    kk->drv.handle_resize(kk);
    168166
    169167    /* Tell libcucul we changed size */
    170     if(new_width != kk->qq->width || new_height != kk->qq->height)
    171         cucul_set_size(kk->qq, new_width, new_height);
     168    if(kk->resize.w != kk->qq->width || kk->resize.h != kk->qq->height)
     169        _cucul_set_size(kk->qq, kk->resize.w, kk->resize.h);
    172170}
    173171
Note: See TracChangeset for help on using the changeset viewer.