Changeset 4e7b0ad in mainline


Ignore:
Timestamp:
2022-12-20T17:47:39Z (17 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d9d6f29
Parents:
06176e1
Message:

Add missing actions in display destructor

We might to actually destroy the other components rather than assert
they have been destroyed. But we shall see when we actually implement
graceful shutdown for this (and any other) server.

Location:
uspace/srv/hid/display
Files:
2 edited

Legend:

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

    r06176e1 r4e7b0ad  
    116116void ds_display_destroy(ds_display_t *disp)
    117117{
     118        int i;
     119
    118120        assert(list_empty(&disp->clients));
    119121        assert(list_empty(&disp->wmclients));
    120122        assert(list_empty(&disp->seats));
    121         /* XXX destroy cursors */
     123        assert(list_empty(&disp->ddevs));
     124        assert(list_empty(&disp->seats));
     125        assert(list_empty(&disp->windows));
     126
     127        /* Destroy cursors */
     128        for (i = 0; i < dcurs_limit; i++) {
     129                ds_cursor_destroy(disp->cursor[i]);
     130                disp->cursor[i] = NULL;
     131        }
     132
    122133        gfx_color_delete(disp->bg_color);
    123134        free(disp);
  • uspace/srv/hid/display/test/cursor.c

    r06176e1 r4e7b0ad  
    11/*
    2  * Copyright (c) 2020 Jiri Svoboda
     2 * Copyright (c) 2022 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    117117        PCUT_ASSERT_TRUE(resp.render_called);
    118118
     119        ds_ddev_close(ddev);
    119120        ds_cursor_destroy(cursor);
    120121        ds_display_destroy(disp);
     
    167168        PCUT_ASSERT_FALSE(resp.render_called);
    168169
     170        ds_ddev_close(ddev);
    169171        ds_cursor_destroy(cursor);
    170172        ds_display_destroy(disp);
Note: See TracChangeset for help on using the changeset viewer.