Changeset 1e4a937 in mainline for uspace/lib/display/src/disp_srv.c
- Timestamp:
- 2020-03-09T11:03:58Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e022819
- Parents:
- a2e104e
- git-author:
- Jiri Svoboda <jiri@…> (2020-03-08 10:02:08)
- git-committer:
- Jiri Svoboda <jiri@…> (2020-03-09 11:03:58)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/display/src/disp_srv.c
ra2e104e r1e4a937 37 37 #include <disp_srv.h> 38 38 #include <display/event.h> 39 #include <display/wndresize.h> 39 40 #include <errno.h> 40 41 #include <io/log.h> … … 147 148 } 148 149 150 static void display_window_resize_req_srv(display_srv_t *srv, ipc_call_t *icall) 151 { 152 sysarg_t wnd_id; 153 ipc_call_t call; 154 display_wnd_rsztype_t rsztype; 155 gfx_coord2_t pos; 156 size_t size; 157 errno_t rc; 158 159 wnd_id = ipc_get_arg1(icall); 160 rsztype = (display_wnd_rsztype_t) ipc_get_arg2(icall); 161 162 if (!async_data_write_receive(&call, &size)) { 163 async_answer_0(&call, EREFUSED); 164 async_answer_0(icall, EREFUSED); 165 return; 166 } 167 168 if (size != sizeof(gfx_coord2_t)) { 169 async_answer_0(&call, EINVAL); 170 async_answer_0(icall, EINVAL); 171 return; 172 } 173 174 rc = async_data_write_finalize(&call, &pos, size); 175 if (rc != EOK) { 176 async_answer_0(&call, rc); 177 async_answer_0(icall, rc); 178 return; 179 } 180 181 if (srv->ops->window_resize_req == NULL) { 182 async_answer_0(icall, ENOTSUP); 183 return; 184 } 185 186 rc = srv->ops->window_resize_req(srv->arg, wnd_id, rsztype, &pos); 187 async_answer_0(icall, rc); 188 } 189 149 190 static void display_window_resize_srv(display_srv_t *srv, ipc_call_t *icall) 150 191 { … … 256 297 case DISPLAY_WINDOW_MOVE_REQ: 257 298 display_window_move_req_srv(srv, &call); 299 break; 300 case DISPLAY_WINDOW_RESIZE_REQ: 301 display_window_resize_req_srv(srv, &call); 258 302 break; 259 303 case DISPLAY_WINDOW_RESIZE:
Note:
See TracChangeset
for help on using the changeset viewer.