ExcCode screen_init(xcb_connection_t *cur_display, xcb_screen_t *cur_screen, xcb_window_t cur_root) { display = cur_display; screen = cur_screen; root = cur_root; if (!screen_shm_init()) shm_available = 1; else syslog(LOG_NOTICE, "%s", exc_message); if (!screen_cursor_init()) cursor_available = 1; else syslog(LOG_NOTICE, "%s", exc_message); return 0; }
ExcCode screen_init(xcb_connection_t *cur_display, xcb_screen_t *cur_screen, xcb_window_t cur_root) { display = cur_display; screen = cur_screen; root = cur_root; if (!screen_shm_init()) shm_available = 1; else syslog(LOG_NOTICE, "Shared memory is not available for screen capture, using sockets instead"); if (!screen_cursor_init()) cursor_available = 1; else syslog(LOG_NOTICE, "Cursor capture is not available, the corresponding setting will have no effect"); return 0; }