Changeset 983052c in mainline for uspace/lib/ui/test/ui.c


Ignore:
Timestamp:
2023-10-10T12:30:54Z (10 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bd2fab5
Parents:
9bec33a
git-author:
Jiri Svoboda <jiri@…> (2023-10-09 18:30:06)
git-committer:
Jiri Svoboda <jiri@…> (2023-10-10 12:30:54)
Message:

Task bar should not crash when starting in terminal

Firstly, we need to make sure we do not paint anything while
UI is suspended. Also, we were missing calls to ui_lock/unlock()
while delivering kbd/pos events from console.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/test/ui.c

    r9bec33a r983052c  
    11/*
    2  * Copyright (c) 2022 Jiri Svoboda
     2 * Copyright (c) 2023 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    6969}
    7070
    71 /** ui_suspend() / ui_resume() do nothing if we don't have a console */
     71/** ui_suspend() / ui_resume() do nothing if we don't have a console,
     72 * ui_is_suspended() returns suspend status
     73 */
    7274PCUT_TEST(suspend_resume)
    7375{
     
    7981        PCUT_ASSERT_NOT_NULL(ui);
    8082
     83        PCUT_ASSERT_FALSE(ui_is_suspended(ui));
     84
    8185        rc = ui_suspend(ui);
    8286        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     87
     88        PCUT_ASSERT_TRUE(ui_is_suspended(ui));
     89
    8390        rc = ui_resume(ui);
    8491        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     92
     93        PCUT_ASSERT_FALSE(ui_is_suspended(ui));
    8594
    8695        ui_destroy(ui);
Note: See TracChangeset for help on using the changeset viewer.