Changeset 0e6e77f in mainline for uspace/lib/display/src/disp_srv.c
- Timestamp:
- 2020-02-28T15:44:55Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a8eed5f
- Parents:
- 2a515dcd
- git-author:
- Jiri Svoboda <jiri@…> (2020-02-26 18:26:13)
- git-committer:
- Jiri Svoboda <jiri@…> (2020-02-28 15:44:55)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/display/src/disp_srv.c
r2a515dcd r0e6e77f 43 43 #include <stdlib.h> 44 44 #include <stddef.h> 45 #include "../private/params.h" 45 46 46 47 static void display_callback_create_srv(display_srv_t *srv, ipc_call_t *call) … … 108 109 } 109 110 111 static void display_window_resize_srv(display_srv_t *srv, ipc_call_t *icall) 112 { 113 sysarg_t wnd_id; 114 ipc_call_t call; 115 display_wnd_move_t wmove; 116 size_t size; 117 errno_t rc; 118 119 wnd_id = ipc_get_arg1(icall); 120 121 if (!async_data_write_receive(&call, &size)) { 122 async_answer_0(&call, EREFUSED); 123 async_answer_0(icall, EREFUSED); 124 return; 125 } 126 127 if (size != sizeof(display_wnd_move_t)) { 128 async_answer_0(&call, EINVAL); 129 async_answer_0(icall, EINVAL); 130 return; 131 } 132 133 rc = async_data_write_finalize(&call, &wmove, size); 134 if (rc != EOK) { 135 async_answer_0(&call, rc); 136 async_answer_0(icall, rc); 137 return; 138 } 139 140 if (srv->ops->window_resize == NULL) { 141 async_answer_0(icall, ENOTSUP); 142 return; 143 } 144 145 rc = srv->ops->window_resize(srv->arg, wnd_id, &wmove.offs, 146 &wmove.nrect); 147 async_answer_0(icall, rc); 148 } 149 110 150 static void display_get_event_srv(display_srv_t *srv, ipc_call_t *icall) 111 151 { … … 175 215 case DISPLAY_WINDOW_DESTROY: 176 216 display_window_destroy_srv(srv, &call); 217 break; 218 case DISPLAY_WINDOW_RESIZE: 219 display_window_resize_srv(srv, &call); 177 220 break; 178 221 case DISPLAY_GET_EVENT:
Note:
See TracChangeset
for help on using the changeset viewer.