Ignore:
File:
1 edited

Legend:

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

    r3f06dae r10cb47e  
    104104static void getterm(const char *svc, const char *app)
    105105{
    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);
     106        task_spawnl(NULL, NULL, APP_GETTERM, APP_GETTERM, svc,
     107            LOCFS_MOUNT_POINT, "--msg", "--wait", "--", app, NULL);
    116108}
    117109
     
    194186        //        for full UTF-32 coverage.
    195187       
    196         uint16_t glyph = fb_font_glyph(field->ch);
     188        uint16_t glyph = fb_font_glyph(field->ch, NULL);
    197189       
    198190        for (unsigned int y = 0; y < FONT_SCANLINES; y++) {
     
    262254       
    263255        bool front_visibility =
    264             chargrid_get_cursor_visibility(term->frontbuf);
     256            chargrid_get_cursor_visibility(term->frontbuf) &&
     257            term->widget.window->is_focused;
    265258        bool back_visibility =
    266259            chargrid_get_cursor_visibility(term->backbuf);
     
    685678        terminal_t *term = NULL;
    686679       
    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)) {
     680        list_foreach(terms, link, terminal_t, cur) {
     681                if (cur->dsid == (service_id_t) IPC_GET_ARG2(*icall)) {
    691682                        term = cur;
    692683                        break;
     
    705696}
    706697
    707 bool init_terminal(terminal_t *term, widget_t *parent, sysarg_t width,
    708     sysarg_t height)
    709 {
    710         widget_init(&term->widget, parent);
     698bool 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);
    711702       
    712703        link_initialize(&term->link);
     
    753744        term->top_row = 0;
    754745       
    755         async_set_client_connection(term_connection);
     746        async_set_fallback_port_handler(term_connection, NULL);
    756747        con_srvs_init(&term->srvs);
    757748        term->srvs.ops = &con_ops;
     
    780771}
    781772
    782 terminal_t *create_terminal(widget_t *parent, sysarg_t width, sysarg_t height)
     773terminal_t *create_terminal(widget_t *parent, const void *data, sysarg_t width,
     774    sysarg_t height)
    783775{
    784776        terminal_t *term = (terminal_t *) malloc(sizeof(terminal_t));
     
    786778                return NULL;
    787779       
    788         bool ret = init_terminal(term, parent, width, height);
     780        bool ret = init_terminal(term, parent, data, width, height);
    789781        if (!ret) {
    790782                free(term);
Note: See TracChangeset for help on using the changeset viewer.