Changeset fd777a2 in mainline for uspace/srv/hid/display/client.c


Ignore:
Timestamp:
2019-11-29T23:58:15Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
879d7245
Parents:
cf32dbd
Message:

Add list of all windows on a display, in stacking order

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/display/client.c

    rcf32dbd rfd777a2  
    9393 * @param client client
    9494 * @param wnd Window
    95  * @return EOK on success, ENOMEM if there are no free window identifiers
    96  */
    97 errno_t ds_client_add_window(ds_client_t *client, ds_window_t *wnd)
     95 */
     96void ds_client_add_window(ds_client_t *client, ds_window_t *wnd)
    9897{
    9998        assert(wnd->client == NULL);
    100         assert(!link_used(&wnd->lwindows));
     99        assert(!link_used(&wnd->lcwindows));
    101100
    102101        wnd->client = client;
    103102        wnd->id = client->display->next_wnd_id++;
    104         list_append(&wnd->lwindows, &client->windows);
    105 
    106         return EOK;
     103        list_append(&wnd->lcwindows, &client->windows);
    107104}
    108105
     
    122119        }
    123120
    124         list_remove(&wnd->lwindows);
     121        list_remove(&wnd->lcwindows);
    125122        wnd->client = NULL;
    126123}
     
    162159                return NULL;
    163160
    164         return list_get_instance(link, ds_window_t, lwindows);
     161        return list_get_instance(link, ds_window_t, lcwindows);
    165162}
    166163
     
    172169ds_window_t *ds_client_next_window(ds_window_t *wnd)
    173170{
    174         link_t *link = list_next(&wnd->lwindows, &wnd->client->windows);
     171        link_t *link = list_next(&wnd->lcwindows, &wnd->client->windows);
    175172
    176173        if (link == NULL)
    177174                return NULL;
    178175
    179         return list_get_instance(link, ds_window_t, lwindows);
     176        return list_get_instance(link, ds_window_t, lcwindows);
    180177}
    181178
Note: See TracChangeset for help on using the changeset viewer.