Changeset 983052c in mainline for uspace/app/taskbar/clock.c


Ignore:
Timestamp:
2023-10-10T12:30:54Z (2 years 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/app/taskbar/clock.c

    r9bec33a r983052c  
    322322{
    323323        taskbar_clock_t *clock = (taskbar_clock_t *) arg;
     324        ui_t *ui;
     325
     326        ui = ui_window_get_ui(clock->window);
     327        ui_lock(ui);
    324328
    325329        fibril_mutex_lock(&clock->lock);
    326         (void) taskbar_clock_paint(clock);
     330        if (!ui_is_suspended(ui_window_get_ui(clock->window)))
     331                (void) taskbar_clock_paint(clock);
    327332
    328333        if (!clock->timer_cleanup) {
     
    336341
    337342        fibril_mutex_unlock(&clock->lock);
     343        ui_unlock(ui);
    338344}
    339345
Note: See TracChangeset for help on using the changeset viewer.