Changeset 7cc30e9 in mainline for uspace/srv/hid/display/wmops.c


Ignore:
Timestamp:
2022-10-24T17:50:46Z (19 months 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/srv/hid/display/wmops.c

    r7a05d924 r7cc30e9  
    9898    wndmgt_window_info_t **rinfo)
    9999{
    100 
    101 /*      ds_client_t *client = (ds_client_t *) arg;
     100        ds_display_t *disp = (ds_display_t *)arg;
    102101        ds_window_t *wnd;
    103 
    104         ds_display_lock(client->display);
    105 
    106         wnd = ds_client_find_window(client, wnd_id);
    107         if (wnd == NULL) {
    108                 ds_display_unlock(client->display);
    109                 return ENOENT;
    110         }
    111 
    112         log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_get_pos()");
    113         ds_window_get_pos(wnd, pos);
    114         ds_display_unlock(client->display);
    115         return EOK;*/
    116102        wndmgt_window_info_t *info;
    117103
    118104        log_msg(LOG_DEFAULT, LVL_DEBUG, "dispwm_get_window_info()");
     105
     106        wnd = ds_display_find_window(disp, wnd_id);
     107        if (wnd == NULL)
     108                return ENOENT;
    119109
    120110        info = calloc(1, sizeof(wndmgt_window_info_t));
     
    122112                return ENOMEM;
    123113
    124         info->caption = str_dup("Hello");
     114        info->caption = str_dup(wnd->caption);
    125115        if (info->caption == NULL) {
    126116                free(info);
Note: See TracChangeset for help on using the changeset viewer.