Changeset 7cc30e9 in mainline for uspace/lib/ui/src/window.c


Ignore:
Timestamp:
2022-10-24T17:50:46Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
913add60
Parents:
7a05d924
Message:

Display server needs to store window caption

Even though it does not use it itself, it needs to provide it to
window managers (e.g. Task bar). We need to be able to set caption
for a new window and to change it for an existing window.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/src/window.c

    r7a05d924 r7cc30e9  
    222222        display_wnd_params_init(&dparams);
    223223        dparams.rect = params->rect;
     224        dparams.caption = params->caption;
    224225        /* Only allow making the window larger */
    225226        gfx_rect_dims(&params->rect, &dparams.min_size);
     
    651652errno_t ui_window_set_caption(ui_window_t *window, const char *caption)
    652653{
     654        errno_t rc;
     655
     656        /* Set console caption if fullscreen window on console */
     657        if (window->ui->console != NULL && window->placement ==
     658            ui_wnd_place_full_screen) {
     659                rc = console_set_caption(window->ui->console, caption);
     660                if (rc != EOK)
     661                        return rc;
     662        }
     663
     664        /* Set display window caption if running on display service */
     665        if (window->dwindow != NULL) {
     666                rc = display_window_set_caption(window->dwindow, caption);
     667                if (rc != EOK)
     668                        return rc;
     669        }
     670
    653671        return ui_wdecor_set_caption(window->wdecor, caption);
    654672}
Note: See TracChangeset for help on using the changeset viewer.