Changeset 338d0935 in mainline for uspace/lib/gui/window.c
- Timestamp:
- 2020-03-02T11:22:01Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a2e104e
- Parents:
- 7bb45e3
- git-author:
- Jiri Svoboda <jiri@…> (2020-02-01 11:18:50)
- git-committer:
- Jiri Svoboda <jiri@…> (2020-03-02 11:22:01)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gui/window.c
r7bb45e3 r338d0935 83 83 static pixel_t color_caption_unfocus = PIXEL(255, 207, 207, 207); 84 84 85 static void window_close_event(void *); 85 86 static void window_focus_event(void *); 86 87 static void window_kbd_event(void *, kbd_event_t *); … … 89 90 90 91 static display_wnd_cb_t window_cb = { 92 .close_event = window_close_event, 91 93 .focus_event = window_focus_event, 92 94 .kbd_event = window_kbd_event, … … 332 334 //win_grab(widget->window->osess, event.pos_id, flags); 333 335 } else if (close && btn_left) { 334 //win_close_request(widget->window->osess);336 window_close(widget->window); 335 337 } else if (header && btn_left) { 336 338 window_grab_flags_t flags = GF_EMPTY; … … 766 768 void window_close(window_t *win) 767 769 { 768 /* Request compositor to init closing cascade. */ 769 //win_close_request(win->osess); 770 window_event_t *event; 771 772 event = (window_event_t *) calloc(1, sizeof(window_event_t)); 773 if (event == NULL) 774 return; 775 776 link_initialize(&event->link); 777 event->type = ET_WINDOW_CLOSE; 778 prodcons_produce(&win->events, &event->link); 779 } 780 781 static void window_close_event(void *arg) 782 { 783 window_t *win = (window_t *) arg; 784 785 window_close(win); 770 786 } 771 787
Note:
See TracChangeset
for help on using the changeset viewer.