diff --git a/client/displayservers/Wayland/clipboard.c b/client/displayservers/Wayland/clipboard.c index e6b648fa..88eb6078 100644 --- a/client/displayservers/Wayland/clipboard.c +++ b/client/displayservers/Wayland/clipboard.c @@ -202,7 +202,7 @@ static void dataDeviceHandleDataOffer(void * data, static void clipboardReadCancel(struct ClipboardRead * data, bool freeBuf) { - waylandEpollUnregister(data->fd); + waylandPollUnregister(data->fd); close(data->fd); wl_data_offer_destroy(data->offer); if (freeBuf) @@ -307,7 +307,7 @@ static void dataDeviceHandleSelection(void * opaque, return; } - if (!waylandEpollRegister(data->fd, clipboardReadCallback, data, EPOLLIN)) + if (!waylandPollRegister(data->fd, clipboardReadCallback, data, EPOLLIN)) { DEBUG_ERROR("Failed to register clipboard read into epoll: %s", strerror(errno)); close(data->fd); @@ -404,7 +404,7 @@ static void clipboardWriteCallback(uint32_t events, void * opaque) return; error: - waylandEpollUnregister(data->fd); + waylandPollUnregister(data->fd); close(data->fd); countedBufferRelease(&data->buffer); free(data); @@ -432,7 +432,7 @@ static void dataSourceHandleSend(void * data, struct wl_data_source * source, data->pos = 0; data->buffer = transfer->data; countedBufferAddRef(transfer->data); - waylandEpollRegister(fd, clipboardWriteCallback, data, EPOLLOUT); + waylandPollRegister(fd, clipboardWriteCallback, data, EPOLLOUT); return; } diff --git a/client/displayservers/Wayland/poll.c b/client/displayservers/Wayland/poll.c index b1b8f1bd..6ac80fb9 100644 --- a/client/displayservers/Wayland/poll.c +++ b/client/displayservers/Wayland/poll.c @@ -56,7 +56,7 @@ bool waylandPollInit(void) LG_LOCK_INIT(wlWm.pollFreeLock); wlWm.displayFd = wl_display_get_fd(wlWm.display); - if (!waylandEpollRegister(wlWm.displayFd, waylandDisplayCallback, NULL, EPOLLIN)) + if (!waylandPollRegister(wlWm.displayFd, waylandDisplayCallback, NULL, EPOLLIN)) { DEBUG_ERROR("Failed register display to epoll: %s", strerror(errno)); return false; @@ -105,7 +105,7 @@ void waylandWait(unsigned int time) }); } -static void waylandEpollRemoveNode(struct WaylandPoll * node) +static void waylandPollRemoveNode(struct WaylandPoll * node) { INTERLOCKED_SECTION(wlWm.pollLock, { @@ -113,7 +113,7 @@ static void waylandEpollRemoveNode(struct WaylandPoll * node) }); } -bool waylandEpollRegister(int fd, WaylandPollCallback callback, void * opaque, uint32_t events) +bool waylandPollRegister(int fd, WaylandPollCallback callback, void * opaque, uint32_t events) { struct WaylandPoll * node = malloc(sizeof(struct WaylandPoll)); if (!node) @@ -134,7 +134,7 @@ bool waylandEpollRegister(int fd, WaylandPollCallback callback, void * opaque, u .data = (epoll_data_t) { .ptr = node }, }) < 0) { - waylandEpollRemoveNode(node); + waylandPollRemoveNode(node); free(node); return false; } @@ -142,7 +142,7 @@ bool waylandEpollRegister(int fd, WaylandPollCallback callback, void * opaque, u return true; } -bool waylandEpollUnregister(int fd) +bool waylandPollUnregister(int fd) { struct WaylandPoll * node = NULL; INTERLOCKED_SECTION(wlWm.pollLock, @@ -167,7 +167,7 @@ bool waylandEpollUnregister(int fd) return false; } - waylandEpollRemoveNode(node); + waylandPollRemoveNode(node); INTERLOCKED_SECTION(wlWm.pollFreeLock, { diff --git a/client/displayservers/Wayland/wayland.h b/client/displayservers/Wayland/wayland.h index de6388ba..becf4333 100644 --- a/client/displayservers/Wayland/wayland.h +++ b/client/displayservers/Wayland/wayland.h @@ -229,8 +229,8 @@ int32_t waylandOutputGetScale(struct wl_output * output); // poll module bool waylandPollInit(void); void waylandWait(unsigned int time); -bool waylandEpollRegister(int fd, WaylandPollCallback callback, void * opaque, uint32_t events); -bool waylandEpollUnregister(int fd); +bool waylandPollRegister(int fd, WaylandPollCallback callback, void * opaque, uint32_t events); +bool waylandPollUnregister(int fd); // registry module bool waylandRegistryInit(void);