Changes in uspace/lib/ui/src/ui.c [983052c:b1f0a14] in mainline
- File:
-
- 1 edited
-
uspace/lib/ui/src/ui.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/ui.c
r983052c rb1f0a14 338 338 switch (event->type) { 339 339 case CEV_KEY: 340 ui_lock(ui);341 340 ui_window_send_kbd(awnd, &event->ev.key); 342 ui_unlock(ui);343 341 break; 344 342 case CEV_POS: … … 350 348 claim = ui_wdecor_pos_event(awnd->wdecor, &pos); 351 349 /* Note: If event is claimed, awnd might not be valid anymore */ 352 if (claim == ui_unclaimed) { 353 ui_lock(ui); 350 if (claim == ui_unclaimed) 354 351 ui_window_send_pos(awnd, &pos); 355 ui_unlock(ui);356 }357 352 358 353 break; … … 459 454 errno_t ui_suspend(ui_t *ui) 460 455 { 461 errno_t rc; 462 463 assert(!ui->suspended); 464 465 if (ui->cgc == NULL) { 466 ui->suspended = true; 456 if (ui->cgc == NULL) 467 457 return EOK; 468 }469 458 470 459 (void) console_set_caption(ui->console, ""); 471 rc = console_gc_suspend(ui->cgc); 472 if (rc != EOK) 473 return rc; 474 475 ui->suspended = true; 476 return EOK; 460 return console_gc_suspend(ui->cgc); 477 461 } 478 462 … … 493 477 cons_event_t ev; 494 478 495 assert(ui->suspended); 496 497 if (ui->cgc == NULL) { 498 ui->suspended = false; 479 if (ui->cgc == NULL) 499 480 return EOK; 500 }501 481 502 482 rc = console_get_pos(ui->console, &col, &row); … … 530 510 return rc; 531 511 532 ui->suspended = false;533 534 512 awnd = ui_window_get_active(ui); 535 513 if (awnd != NULL) 536 514 (void) console_set_caption(ui->console, awnd->wdecor->caption); 537 515 538 rc = gfx_cursor_set_visible(console_gc_get_ctx(ui->cgc), false); 539 if (rc != EOK) 540 return rc; 541 542 return EOK; 543 } 544 545 /** Determine if UI is suspended. 546 * 547 * @param ui UI 548 * @return @c true iff UI is suspended 549 */ 550 bool ui_is_suspended(ui_t *ui) 551 { 552 return ui->suspended; 516 return gfx_cursor_set_visible(console_gc_get_ctx(ui->cgc), false); 553 517 } 554 518
Note:
See TracChangeset
for help on using the changeset viewer.
