Changeset 0680854 in mainline for uspace/lib/display/src/disp_srv.c
- Timestamp:
- 2020-03-20T15:42:27Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0b7e394
- Parents:
- aeb3037
- git-author:
- Jiri Svoboda <jiri@…> (2020-03-19 19:42:21)
- git-committer:
- Jiri Svoboda <jiri@…> (2020-03-20 15:42:27)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/display/src/disp_srv.c
raeb3037 r0680854 149 149 } 150 150 151 static void display_window_resize_req_srv(display_srv_t *srv, ipc_call_t *icall) 152 { 153 sysarg_t wnd_id; 154 ipc_call_t call; 155 display_wnd_rsztype_t rsztype; 156 gfx_coord2_t pos; 151 static void display_window_move_srv(display_srv_t *srv, ipc_call_t *icall) 152 { 153 sysarg_t wnd_id; 154 ipc_call_t call; 155 gfx_coord2_t dpos; 157 156 size_t size; 158 157 errno_t rc; 159 158 160 159 wnd_id = ipc_get_arg1(icall); 161 rsztype = (display_wnd_rsztype_t) ipc_get_arg2(icall);162 160 163 161 if (!async_data_write_receive(&call, &size)) { … … 173 171 } 174 172 173 rc = async_data_write_finalize(&call, &dpos, size); 174 if (rc != EOK) { 175 async_answer_0(&call, rc); 176 async_answer_0(icall, rc); 177 return; 178 } 179 180 if (srv->ops->window_move == NULL) { 181 async_answer_0(icall, ENOTSUP); 182 return; 183 } 184 185 rc = srv->ops->window_move(srv->arg, wnd_id, &dpos); 186 async_answer_0(icall, rc); 187 } 188 189 190 static void display_window_resize_req_srv(display_srv_t *srv, ipc_call_t *icall) 191 { 192 sysarg_t wnd_id; 193 ipc_call_t call; 194 display_wnd_rsztype_t rsztype; 195 gfx_coord2_t pos; 196 size_t size; 197 errno_t rc; 198 199 wnd_id = ipc_get_arg1(icall); 200 rsztype = (display_wnd_rsztype_t) ipc_get_arg2(icall); 201 202 if (!async_data_write_receive(&call, &size)) { 203 async_answer_0(&call, EREFUSED); 204 async_answer_0(icall, EREFUSED); 205 return; 206 } 207 208 if (size != sizeof(gfx_coord2_t)) { 209 async_answer_0(&call, EINVAL); 210 async_answer_0(icall, EINVAL); 211 return; 212 } 213 175 214 rc = async_data_write_finalize(&call, &pos, size); 176 215 if (rc != EOK) { … … 339 378 case DISPLAY_WINDOW_MOVE_REQ: 340 379 display_window_move_req_srv(srv, &call); 380 break; 381 case DISPLAY_WINDOW_MOVE: 382 display_window_move_srv(srv, &call); 341 383 break; 342 384 case DISPLAY_WINDOW_RESIZE_REQ:
Note:
See TracChangeset
for help on using the changeset viewer.