Changeset b43edabe in mainline
- Timestamp:
- 2020-02-10T19:10:15Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b252e87
- Parents:
- f7fb2b21
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gui/window.c
rf7fb2b21 rb43edabe 462 462 463 463 /* Inform compositor about new surface. */ 464 // errno_t rc = win_resize(win->osess, offset_x, offset_y, width, height, 465 // placement_flags, surface_direct_access(new_surface)); 464 #if 0 465 errno_t rc = win_resize(win->osess, offset_x, offset_y, width, height, 466 placement_flags, surface_direct_access(new_surface)); 467 #endif 466 468 rc = EOK; 467 469 … … 520 522 fibril_mutex_unlock(&win->guard); 521 523 522 523 524 if (width > 0 && height > 0) { 524 525 /* Notify compositor. */ … … 530 531 rect.p1.y = y + height; 531 532 532 printf("render damaged region: %d,%d,%d,%d,\n",533 (int)x,(int)y,(int)width,(int)height);534 533 if (win->bitmap != NULL) 535 534 (void) gfx_bitmap_render(win->bitmap, &rect, NULL); … … 638 637 exit(0); /* Terminate whole task. */ 639 638 } 640 return 0;641 }642 643 /* Input fetcher from compositor. Runs in own dedicated fibril. */644 static errno_t fetch_input(void *arg)645 {646 // errno_t rc;647 // bool terminate = false;648 // window_t *win = (window_t *) arg;649 650 /* while (true) {651 window_event_t *event = (window_event_t *) malloc(sizeof(window_event_t));652 653 if (event) {654 rc = win_get_event(win->isess, event);655 if (rc == EOK) {656 terminate = (event->type == ET_WINDOW_CLOSE);657 link_initialize(&event->link);658 prodcons_produce(&win->events, &event->link);659 } else {660 free(event);661 terminate = true;662 }663 } else {664 terminate = true;665 }666 667 if (terminate) {668 break;669 }670 }671 */672 639 return 0; 673 640 } … … 704 671 } 705 672 706 707 673 if (caption == NULL) 708 674 win->caption = NULL; … … 777 743 { 778 744 fid_t ev_fid = fibril_create(event_loop, win); 779 fid_t fi_fid = fibril_create(fetch_input, win); 780 if (!ev_fid || !fi_fid) { 745 if (!ev_fid) { 781 746 return; 782 747 } 783 748 fibril_add_ready(ev_fid); 784 fibril_add_ready(fi_fid);785 749 } 786 750
Note:
See TracChangeset
for help on using the changeset viewer.