Changeset ba02baa in mainline for uspace/lib/gui/window.c
- Timestamp:
- 2014-01-16T17:23:30Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 62fbb7e
- Parents:
- dace86a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gui/window.c
rdace86a rba02baa 592 592 const char *caption, sysarg_t x_offset, sysarg_t y_offset) 593 593 { 594 int rc;595 596 594 window_t *win = (window_t *) malloc(sizeof(window_t)); 597 if (!win) {595 if (!win) 598 596 return NULL; 599 } 600 597 601 598 win->is_main = is_main; 602 599 win->is_decorated = is_decorated; … … 604 601 prodcons_initialize(&win->events); 605 602 fibril_mutex_initialize(&win->guard); 603 606 604 widget_init(&win->root, NULL); 607 605 win->root.window = win; … … 615 613 win->focus = NULL; 616 614 win->surface = NULL; 617 615 618 616 service_id_t reg_dsid; 619 async_sess_t *reg_sess; 620 621 rc = loc_service_get_id(winreg, ®_dsid, 0); 617 int rc = loc_service_get_id(winreg, ®_dsid, 0); 622 618 if (rc != EOK) { 623 619 free(win); 624 620 return NULL; 625 621 } 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); 628 625 if (reg_sess == NULL) { 629 626 free(win); 630 627 return NULL; 631 628 } 632 629 633 630 service_id_t in_dsid; 634 631 service_id_t out_dsid; 635 636 632 rc = win_register(reg_sess, &in_dsid, &out_dsid, x_offset, y_offset); 637 633 async_hangup(reg_sess); … … 640 636 return NULL; 641 637 } 642 638 643 639 win->osess = loc_service_connect(EXCHANGE_SERIALIZE, out_dsid, 0); 644 640 if (win->osess == NULL) { … … 646 642 return NULL; 647 643 } 648 644 649 645 win->isess = loc_service_connect(EXCHANGE_SERIALIZE, in_dsid, 0); 650 646 if (win->isess == NULL) { … … 653 649 return NULL; 654 650 } 655 656 if (caption == NULL) {651 652 if (caption == NULL) 657 653 win->caption = NULL; 658 } else {654 else 659 655 win->caption = str_dup(caption); 660 } 661 656 662 657 return win; 663 658 }
Note:
See TracChangeset
for help on using the changeset viewer.