Changeset 8279aab in mainline for uspace/lib/ui/src/ui.c


Ignore:
Timestamp:
2025-01-07T12:26:56Z (3 weeks ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
4e1221c
Parents:
12dd36c
git-author:
Jiri Svoboda <jiri@…> (2025-01-06 19:26:42)
git-committer:
Jiri Svoboda <jiri@…> (2025-01-07 12:26:56)
Message:

ui_lock() needs to lock display

If ui_lock() is used to lock UI while destroying a window in a separate
fibril, we need to make sure we cannot get display events for
that destroyed window.

File:
1 edited

Legend:

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

    r12dd36c r8279aab  
    11/*
    2  * Copyright (c) 2023 Jiri Svoboda
     2 * Copyright (c) 2025 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    568568void ui_lock(ui_t *ui)
    569569{
     570        if (ui->display != NULL)
     571                display_lock(ui->display);
    570572        fibril_mutex_lock(&ui->lock);
    571573}
     
    582584{
    583585        fibril_mutex_unlock(&ui->lock);
     586        if (ui->display != NULL)
     587                display_unlock(ui->display);
    584588}
    585589
Note: See TracChangeset for help on using the changeset viewer.