Changeset 63a3276 in mainline for uspace/srv/hid/compositor/compositor.c
- Timestamp:
- 2019-08-06T19:20:35Z (5 years ago)
- Children:
- 3f05ef7
- Parents:
- 72c8f77
- git-author:
- Michal Koutný <xm.koutny+hos@…> (2015-06-17 23:02:03)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2019-08-06 19:20:35)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/compositor/compositor.c
r72c8f77 r63a3276 2267 2267 if (!list_empty(&viewport_list)) 2268 2268 input_activate(input); 2269 2270 2269 ret: 2271 2270 fibril_mutex_unlock(&discovery_mtx); … … 2285 2284 bg_color = PIXEL(255, 69, 51, 103); 2286 2285 2287 /* Register compositor server. */ 2288 async_set_fallback_port_handler(client_connection, NULL); 2289 2290 errno_t rc = loc_server_register(NAME); 2286 /* Establish input bidirectional connection. */ 2287 errno_t rc = input_connect(input_svc); 2288 if (rc != EOK) { 2289 printf("%s: Failed to connect to input service.\n", NAME); 2290 return rc; 2291 } 2292 2293 rc = loc_register_cat_change_cb(category_change_cb, NULL); 2294 if (rc != EOK) { 2295 printf("%s: Failed to register category change callback\n", NAME); 2296 input_disconnect(); 2297 return rc; 2298 } 2299 2300 discover_viewports(); 2301 2302 comp_restrict_pointers(); 2303 comp_damage(0, 0, UINT32_MAX, UINT32_MAX); 2304 2305 /* Finally, register compositor server. */ 2306 async_set_fallback_port_handler(client_connection); 2307 2308 rc = loc_server_register(NAME); 2291 2309 if (rc != EOK) { 2292 2310 printf("%s: Unable to register server (%s)\n", NAME, str_error(rc)); 2293 return -1;2294 } 2295 2311 return rc; 2312 } 2313 2296 2314 server_name = name; 2297 2298 char svc[LOC_NAME_MAXLEN + 1]; 2299 snprintf(svc, LOC_NAME_MAXLEN, "%s/%s", NAMESPACE, server_name); 2300 2301 service_id_t service_id; 2302 rc = loc_service_register(svc, &service_id); 2303 if (rc != EOK) { 2304 printf("%s: Unable to register service %s\n", NAME, svc); 2305 return rc; 2306 } 2307 2315 2308 2316 /* Prepare window registrator (entrypoint for clients). */ 2309 2317 char winreg[LOC_NAME_MAXLEN + 1]; … … 2311 2319 if (loc_service_register(winreg, &winreg_id) != EOK) { 2312 2320 printf("%s: Unable to register service %s\n", NAME, winreg); 2313 return -1;2314 }2315 2316 /* Establish input bidirectional connection. */2317 rc = input_connect(input_svc);2318 if (rc != EOK) {2319 printf("%s: Failed to connect to input service.\n", NAME);2320 2321 return rc; 2321 2322 } 2322 2323 rc = loc_register_cat_change_cb(category_change_cb, NULL);2324 if (rc != EOK) {2325 printf("%s: Failed to register category change callback\n", NAME);2326 input_disconnect();2327 return rc;2328 }2329 2330 discover_viewports();2331 2332 comp_restrict_pointers();2333 comp_damage(0, 0, UINT32_MAX, UINT32_MAX);2334 2323 2335 2324 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.