Ignore:
Timestamp:
2014-01-16T17:23:30Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
62fbb7e
Parents:
dace86a
Message:

cstyle (no change in functionality)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/compositor/compositor.c

    rdace86a rba02baa  
    161161static void input_disconnect(void);
    162162
    163 
    164163static pointer_t *input_pointer(input_t *input)
    165164{
     
    170169{
    171170        pointer_t *p = (pointer_t *) malloc(sizeof(pointer_t));
    172         if (!p) {
     171        if (!p)
    173172                return NULL;
    174         }
    175 
     173       
    176174        link_initialize(&p->link);
    177175        p->pos.x = coord_origin;
     
    185183        p->state = 0;
    186184        cursor_init(&p->cursor, CURSOR_DECODER_EMBEDDED, NULL);
    187 
     185       
    188186        /* Ghost window for transformation animation. */
    189187        transform_identity(&p->ghost.transform);
     
    198196        p->accum_ghost.x = 0;
    199197        p->accum_ghost.y = 0;
    200 
     198       
    201199        return p;
    202200}
     
    213211{
    214212        window_t *win = (window_t *) malloc(sizeof(window_t));
    215         if (!win) {
     213        if (!win)
    216214                return NULL;
    217         }
    218 
     215       
    219216        link_initialize(&win->link);
    220217        atomic_set(&win->ref_cnt, 0);
    221218        prodcons_initialize(&win->queue);
    222219        transform_identity(&win->transform);
    223         transform_translate(&win->transform, 
     220        transform_translate(&win->transform,
    224221            coord_origin + x_offset, coord_origin + y_offset);
    225222        win->dx = coord_origin + x_offset;
     
    230227        win->opacity = 255;
    231228        win->surface = NULL;
    232 
     229       
    233230        return win;
    234231}
     
    707704{
    708705        fibril_mutex_lock(&window_list_mtx);
    709 
     706       
    710707        list_foreach(window_list, link, window_t, window) {
    711708                if (window == target) {
     
    715712                }
    716713        }
    717 
     714       
    718715        fibril_mutex_unlock(&window_list_mtx);
    719716        free(event);
     
    723720{
    724721        fibril_mutex_lock(&window_list_mtx);
     722       
    725723        window_t *win = (window_t *) list_first(&window_list);
    726         if (win) {
     724        if (win)
    727725                prodcons_produce(&win->queue, &event->link);
    728         } else {
     726        else
    729727                free(event);
    730         }
     728       
    731729        fibril_mutex_unlock(&window_list_mtx);
    732730}
     
    11821180        transform_identity(&translate);
    11831181        transform_translate(&translate, win->dx, win->dy);
    1184 
     1182       
    11851183        transform_t scale;
    11861184        transform_identity(&scale);
    1187         if (win->fx != 1 || win->fy != 1) {
     1185        if ((win->fx != 1) || (win->fy != 1))
    11881186                transform_scale(&scale, win->fx, win->fy);
    1189         }
    1190 
     1187       
    11911188        transform_t rotate;
    11921189        transform_identity(&rotate);
    1193         if (win->angle != 0) {
     1190        if (win->angle != 0)
    11941191                transform_rotate(&rotate, win->angle);
    1195         }
    1196 
     1192       
    11971193        transform_t transform;
    11981194        transform_t temp;
     
    12051201        transform_multiply(&transform, &temp, &scale);
    12061202       
    1207 
    12081203        win->transform = transform;
    12091204}
     
    12681263                        if (fx > 0) {
    12691264#if ANIMATE_WINDOW_TRANSFORMS == 0
    1270                                 if (scale) win->fx *= fx;
     1265                                if (scale)
     1266                                        win->fx *= fx;
    12711267#endif
    12721268#if ANIMATE_WINDOW_TRANSFORMS == 1
Note: See TracChangeset for help on using the changeset viewer.