Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/gui/terminal.c

    r10cb47e r3f06dae  
    104104static void getterm(const char *svc, const char *app)
    105105{
    106         task_spawnl(NULL, NULL, APP_GETTERM, APP_GETTERM, svc,
    107             LOCFS_MOUNT_POINT, "--msg", "--wait", "--", app, NULL);
     106        char term[LOC_NAME_MAXLEN];
     107        snprintf(term, LOC_NAME_MAXLEN, "%s/%s", LOCFS_MOUNT_POINT, svc);
     108       
     109        /* Wait for the terminal service to be ready */
     110        service_id_t service_id;
     111        int rc = loc_service_get_id(svc, &service_id, IPC_FLAG_BLOCKING);
     112        if (rc != EOK)
     113                return;
     114       
     115        task_spawnl(NULL, APP_GETTERM, APP_GETTERM, "-w", term, app, NULL);
    108116}
    109117
     
    186194        //        for full UTF-32 coverage.
    187195       
    188         uint16_t glyph = fb_font_glyph(field->ch, NULL);
     196        uint16_t glyph = fb_font_glyph(field->ch);
    189197       
    190198        for (unsigned int y = 0; y < FONT_SCANLINES; y++) {
     
    254262       
    255263        bool front_visibility =
    256             chargrid_get_cursor_visibility(term->frontbuf) &&
    257             term->widget.window->is_focused;
     264            chargrid_get_cursor_visibility(term->frontbuf);
    258265        bool back_visibility =
    259266            chargrid_get_cursor_visibility(term->backbuf);
     
    678685        terminal_t *term = NULL;
    679686       
    680         list_foreach(terms, link, terminal_t, cur) {
    681                 if (cur->dsid == (service_id_t) IPC_GET_ARG2(*icall)) {
     687        list_foreach(terms, link) {
     688                terminal_t *cur = list_get_instance(link, terminal_t, link);
     689               
     690                if (cur->dsid == (service_id_t) IPC_GET_ARG1(*icall)) {
    682691                        term = cur;
    683692                        break;
     
    696705}
    697706
    698 bool init_terminal(terminal_t *term, widget_t *parent, const void *data,
    699     sysarg_t width, sysarg_t height)
    700 {
    701         widget_init(&term->widget, parent, data);
     707bool init_terminal(terminal_t *term, widget_t *parent, sysarg_t width,
     708    sysarg_t height)
     709{
     710        widget_init(&term->widget, parent);
    702711       
    703712        link_initialize(&term->link);
     
    744753        term->top_row = 0;
    745754       
    746         async_set_fallback_port_handler(term_connection, NULL);
     755        async_set_client_connection(term_connection);
    747756        con_srvs_init(&term->srvs);
    748757        term->srvs.ops = &con_ops;
     
    771780}
    772781
    773 terminal_t *create_terminal(widget_t *parent, const void *data, sysarg_t width,
    774     sysarg_t height)
     782terminal_t *create_terminal(widget_t *parent, sysarg_t width, sysarg_t height)
    775783{
    776784        terminal_t *term = (terminal_t *) malloc(sizeof(terminal_t));
     
    778786                return NULL;
    779787       
    780         bool ret = init_terminal(term, parent, data, width, height);
     788        bool ret = init_terminal(term, parent, width, height);
    781789        if (!ret) {
    782790                free(term);
Note: See TracChangeset for help on using the changeset viewer.