Changeset ba02baa in mainline for uspace/lib/gui/window.c


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/lib/gui/window.c

    rdace86a rba02baa  
    592592    const char *caption, sysarg_t x_offset, sysarg_t y_offset)
    593593{
    594         int rc;
    595 
    596594        window_t *win = (window_t *) malloc(sizeof(window_t));
    597         if (!win) {
     595        if (!win)
    598596                return NULL;
    599         }
    600 
     597       
    601598        win->is_main = is_main;
    602599        win->is_decorated = is_decorated;
     
    604601        prodcons_initialize(&win->events);
    605602        fibril_mutex_initialize(&win->guard);
     603       
    606604        widget_init(&win->root, NULL);
    607605        win->root.window = win;
     
    615613        win->focus = NULL;
    616614        win->surface = NULL;
    617 
     615       
    618616        service_id_t reg_dsid;
    619         async_sess_t *reg_sess;
    620 
    621         rc = loc_service_get_id(winreg, &reg_dsid, 0);
     617        int rc = loc_service_get_id(winreg, &reg_dsid, 0);
    622618        if (rc != EOK) {
    623619                free(win);
    624620                return NULL;
    625621        }
    626 
    627         reg_sess = loc_service_connect(EXCHANGE_SERIALIZE, reg_dsid, 0);
     622       
     623        async_sess_t *reg_sess = loc_service_connect(EXCHANGE_SERIALIZE,
     624            reg_dsid, 0);
    628625        if (reg_sess == NULL) {
    629626                free(win);
    630627                return NULL;
    631628        }
    632 
     629       
    633630        service_id_t in_dsid;
    634631        service_id_t out_dsid;
    635        
    636632        rc = win_register(reg_sess, &in_dsid, &out_dsid, x_offset, y_offset);
    637633        async_hangup(reg_sess);
     
    640636                return NULL;
    641637        }
    642 
     638       
    643639        win->osess = loc_service_connect(EXCHANGE_SERIALIZE, out_dsid, 0);
    644640        if (win->osess == NULL) {
     
    646642                return NULL;
    647643        }
    648 
     644       
    649645        win->isess = loc_service_connect(EXCHANGE_SERIALIZE, in_dsid, 0);
    650646        if (win->isess == NULL) {
     
    653649                return NULL;
    654650        }
    655 
    656         if (caption == NULL) {
     651       
     652        if (caption == NULL)
    657653                win->caption = NULL;
    658         } else {
     654        else
    659655                win->caption = str_dup(caption);
    660         }
    661 
     656       
    662657        return win;
    663658}
Note: See TracChangeset for help on using the changeset viewer.