[client] wayland: use consistent naming in poll module

Some of the functions were named WaylandEpoll*, which is inconsistent.
This commit changed them to be WaylandPoll*.
This commit is contained in:
Quantum 2021-03-01 23:51:12 -05:00 committed by Geoffrey McRae
parent fc7dd7dbb7
commit 854b53e28c
3 changed files with 12 additions and 12 deletions

View File

@ -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;
}

View File

@ -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,
{

View File

@ -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);