Changeset 913add60 in mainline for uspace/srv/hid/display/main.c
- Timestamp:
- 2022-10-31T10:53:53Z (2 years ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1b92d4b
- Parents:
- 7cc30e9
- git-author:
- Jiri Svoboda <jiri@…> (2022-10-30 10:53:48)
- git-committer:
- Jiri Svoboda <jiri@…> (2022-10-31 10:53:53)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/main.c
r7cc30e9 r913add60 56 56 #include "seat.h" 57 57 #include "window.h" 58 #include "wmclient.h" 58 59 #include "wmops.h" 59 60 60 61 static void display_client_conn(ipc_call_t *, void *); 61 62 static void display_client_ev_pending(void *); 63 static void display_wmclient_ev_pending(void *); 62 64 static void display_gc_conn(ipc_call_t *, void *); 63 65 static void display_wndmgt_conn(ipc_call_t *, void *); … … 80 82 }; 81 83 84 static ds_wmclient_cb_t display_wmclient_cb = { 85 .ev_pending = display_wmclient_ev_pending 86 }; 87 82 88 static void display_client_ev_pending(void *arg) 83 89 { … … 85 91 86 92 display_srv_ev_pending(srv); 93 } 94 95 static void display_wmclient_ev_pending(void *arg) 96 { 97 wndmgt_srv_t *srv = (wndmgt_srv_t *) arg; 98 99 wndmgt_srv_ev_pending(srv); 87 100 } 88 101 … … 189 202 if (svc_id != 0) { 190 203 /* Create client object */ 204 ds_display_lock(disp); 191 205 rc = ds_client_create(disp, &display_client_cb, &srv, &client); 206 ds_display_unlock(disp); 192 207 if (rc != EOK) { 193 208 async_answer_0(icall, ENOMEM); … … 243 258 { 244 259 ds_display_t *disp = (ds_display_t *) arg; 260 errno_t rc; 245 261 wndmgt_srv_t srv; 262 ds_wmclient_t *wmclient = NULL; 263 264 /* Create WM client object */ 265 ds_display_lock(disp); 266 rc = ds_wmclient_create(disp, &display_wmclient_cb, &srv, &wmclient); 267 ds_display_unlock(disp); 268 if (rc != EOK) { 269 async_answer_0(icall, ENOMEM); 270 return; 271 } 246 272 247 273 /* Set up protocol structure */ 248 274 wndmgt_srv_initialize(&srv); 249 275 srv.ops = &wndmgt_srv_ops; 250 srv.arg = disp;276 srv.arg = wmclient; 251 277 252 278 /* Handle connection */ 253 279 wndmgt_conn(icall, &srv); 280 281 ds_display_lock(disp); 282 ds_wmclient_destroy(wmclient); 283 ds_display_unlock(disp); 254 284 } 255 285
Note:
See TracChangeset
for help on using the changeset viewer.