Changeset c9927c66 in mainline for uspace/lib/display/src/disp_srv.c
- Timestamp:
- 2021-06-10T13:22:33Z (3 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9e84d2c
- Parents:
- c68c18b9
- git-author:
- Jiri Svoboda <jiri@…> (2021-05-27 17:00:30)
- git-committer:
- jxsvoboda <5887334+jxsvoboda@…> (2021-06-10 13:22:33)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/display/src/disp_srv.c
rc68c18b9 rc9927c66 1 1 /* 2 * Copyright (c) 20 19Jiri Svoboda2 * Copyright (c) 2021 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 187 187 } 188 188 189 static void display_window_get_pos_srv(display_srv_t *srv, ipc_call_t *icall) 190 { 191 sysarg_t wnd_id; 192 ipc_call_t call; 193 gfx_coord2_t dpos; 194 size_t size; 195 errno_t rc; 196 197 wnd_id = ipc_get_arg1(icall); 198 199 if (srv->ops->window_get_pos == NULL) { 200 async_answer_0(icall, ENOTSUP); 201 return; 202 } 203 204 if (!async_data_read_receive(&call, &size)) { 205 async_answer_0(icall, EREFUSED); 206 return; 207 } 208 209 rc = srv->ops->window_get_pos(srv->arg, wnd_id, &dpos); 210 if (rc != EOK) { 211 async_answer_0(&call, rc); 212 async_answer_0(icall, rc); 213 return; 214 } 215 216 if (size != sizeof(gfx_coord2_t)) { 217 async_answer_0(&call, EINVAL); 218 async_answer_0(icall, EINVAL); 219 return; 220 } 221 222 rc = async_data_read_finalize(&call, &dpos, size); 223 if (rc != EOK) { 224 async_answer_0(&call, rc); 225 async_answer_0(icall, rc); 226 return; 227 } 228 229 async_answer_0(icall, EOK); 230 } 231 189 232 static void display_window_resize_req_srv(display_srv_t *srv, ipc_call_t *icall) 190 233 { … … 398 441 case DISPLAY_WINDOW_MOVE: 399 442 display_window_move_srv(srv, &call); 443 break; 444 case DISPLAY_WINDOW_GET_POS: 445 display_window_get_pos_srv(srv, &call); 400 446 break; 401 447 case DISPLAY_WINDOW_RESIZE_REQ:
Note:
See TracChangeset
for help on using the changeset viewer.