debug_log(">>> _focus_callback_handler(), this thread id(%u)\n", (unsigned int)pthread_self());
- memset(&cb_data, 0, sizeof(focus_cb_data_lib));
if (!focus_handle) {
debug_error("focus_handle is null");
return G_SOURCE_CONTINUE;
}
- if (!(poll_fd = &focus_handle->fsrc->poll_fd)) {
- debug_error("poll_fd is null");
- return G_SOURCE_CONTINUE;
- }
+ poll_fd = &focus_handle->fsrc->poll_fd;
debug_log("focus_handle(%p), poll_fd(%p)", focus_handle, poll_fd);
+ memset(&cb_data, 0, sizeof(focus_cb_data_lib));
+
if (poll_fd->revents & (POLLIN | POLLPRI)) {
int changed_state = -1;
debug_log(">>> _focus_watch_callback_handler(), this thread id(%u)\n", (unsigned int)pthread_self());
- memset(&cb_data, 0, sizeof(focus_cb_data_lib));
if (!focus_handle) {
debug_error("focus_handle is null");
- return FALSE;
- }
- if (!(poll_fd = &focus_handle->fsrc->poll_fd)) {
- debug_error("g_poll_fd is null");
- return FALSE;
+ return G_SOURCE_CONTINUE;
}
+ poll_fd = &focus_handle->fsrc->poll_fd;
debug_log("focus_handle(%p), poll_fd(%p)", focus_handle, poll_fd);
+ memset(&cb_data, 0, sizeof(focus_cb_data_lib));
+
if (poll_fd->revents & (POLLIN | POLLPRI)) {
count = read(poll_fd->fd, &cb_data, sizeof(cb_data));
if (count < 0){