mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 14:57:20 +00:00
[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:
parent
fc7dd7dbb7
commit
854b53e28c
@ -202,7 +202,7 @@ static void dataDeviceHandleDataOffer(void * data,
|
|||||||
|
|
||||||
static void clipboardReadCancel(struct ClipboardRead * data, bool freeBuf)
|
static void clipboardReadCancel(struct ClipboardRead * data, bool freeBuf)
|
||||||
{
|
{
|
||||||
waylandEpollUnregister(data->fd);
|
waylandPollUnregister(data->fd);
|
||||||
close(data->fd);
|
close(data->fd);
|
||||||
wl_data_offer_destroy(data->offer);
|
wl_data_offer_destroy(data->offer);
|
||||||
if (freeBuf)
|
if (freeBuf)
|
||||||
@ -307,7 +307,7 @@ static void dataDeviceHandleSelection(void * opaque,
|
|||||||
return;
|
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));
|
DEBUG_ERROR("Failed to register clipboard read into epoll: %s", strerror(errno));
|
||||||
close(data->fd);
|
close(data->fd);
|
||||||
@ -404,7 +404,7 @@ static void clipboardWriteCallback(uint32_t events, void * opaque)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
waylandEpollUnregister(data->fd);
|
waylandPollUnregister(data->fd);
|
||||||
close(data->fd);
|
close(data->fd);
|
||||||
countedBufferRelease(&data->buffer);
|
countedBufferRelease(&data->buffer);
|
||||||
free(data);
|
free(data);
|
||||||
@ -432,7 +432,7 @@ static void dataSourceHandleSend(void * data, struct wl_data_source * source,
|
|||||||
data->pos = 0;
|
data->pos = 0;
|
||||||
data->buffer = transfer->data;
|
data->buffer = transfer->data;
|
||||||
countedBufferAddRef(transfer->data);
|
countedBufferAddRef(transfer->data);
|
||||||
waylandEpollRegister(fd, clipboardWriteCallback, data, EPOLLOUT);
|
waylandPollRegister(fd, clipboardWriteCallback, data, EPOLLOUT);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ bool waylandPollInit(void)
|
|||||||
LG_LOCK_INIT(wlWm.pollFreeLock);
|
LG_LOCK_INIT(wlWm.pollFreeLock);
|
||||||
|
|
||||||
wlWm.displayFd = wl_display_get_fd(wlWm.display);
|
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));
|
DEBUG_ERROR("Failed register display to epoll: %s", strerror(errno));
|
||||||
return false;
|
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,
|
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));
|
struct WaylandPoll * node = malloc(sizeof(struct WaylandPoll));
|
||||||
if (!node)
|
if (!node)
|
||||||
@ -134,7 +134,7 @@ bool waylandEpollRegister(int fd, WaylandPollCallback callback, void * opaque, u
|
|||||||
.data = (epoll_data_t) { .ptr = node },
|
.data = (epoll_data_t) { .ptr = node },
|
||||||
}) < 0)
|
}) < 0)
|
||||||
{
|
{
|
||||||
waylandEpollRemoveNode(node);
|
waylandPollRemoveNode(node);
|
||||||
free(node);
|
free(node);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -142,7 +142,7 @@ bool waylandEpollRegister(int fd, WaylandPollCallback callback, void * opaque, u
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool waylandEpollUnregister(int fd)
|
bool waylandPollUnregister(int fd)
|
||||||
{
|
{
|
||||||
struct WaylandPoll * node = NULL;
|
struct WaylandPoll * node = NULL;
|
||||||
INTERLOCKED_SECTION(wlWm.pollLock,
|
INTERLOCKED_SECTION(wlWm.pollLock,
|
||||||
@ -167,7 +167,7 @@ bool waylandEpollUnregister(int fd)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
waylandEpollRemoveNode(node);
|
waylandPollRemoveNode(node);
|
||||||
|
|
||||||
INTERLOCKED_SECTION(wlWm.pollFreeLock,
|
INTERLOCKED_SECTION(wlWm.pollFreeLock,
|
||||||
{
|
{
|
||||||
|
@ -229,8 +229,8 @@ int32_t waylandOutputGetScale(struct wl_output * output);
|
|||||||
// poll module
|
// poll module
|
||||||
bool waylandPollInit(void);
|
bool waylandPollInit(void);
|
||||||
void waylandWait(unsigned int time);
|
void waylandWait(unsigned int time);
|
||||||
bool waylandEpollRegister(int fd, WaylandPollCallback callback, void * opaque, uint32_t events);
|
bool waylandPollRegister(int fd, WaylandPollCallback callback, void * opaque, uint32_t events);
|
||||||
bool waylandEpollUnregister(int fd);
|
bool waylandPollUnregister(int fd);
|
||||||
|
|
||||||
// registry module
|
// registry module
|
||||||
bool waylandRegistryInit(void);
|
bool waylandRegistryInit(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user