Merge pull request #882 from emersion/unprefix-local-symbols

Remove wlr_ prefix from local symbols
This commit is contained in:
Drew DeVault 2018-04-26 11:18:01 +02:00 committed by GitHub
commit fac2c3e25f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 561 additions and 588 deletions

View file

@ -182,14 +182,14 @@ struct x11_data_source {
static const struct wlr_data_source_impl data_source_impl;
bool wlr_data_source_is_xwayland_data_source(
bool data_source_is_xwayland(
struct wlr_data_source *wlr_source) {
return wlr_source->impl == &data_source_impl;
}
static struct x11_data_source *data_source_from_wlr_data_source(
struct wlr_data_source *wlr_source) {
assert(wlr_data_source_is_xwayland_data_source(wlr_source));
assert(data_source_is_xwayland(wlr_source));
return (struct x11_data_source *)wlr_source;
}
@ -225,7 +225,7 @@ struct x11_primary_selection_source {
static void primary_selection_source_cancel(
struct wlr_primary_selection_source *wlr_source);
bool wlr_primary_selection_source_is_xwayland_primary_selection_source(
bool primary_selection_source_is_xwayland(
struct wlr_primary_selection_source *wlr_source) {
return wlr_source->cancel == primary_selection_source_cancel;
}

View file

@ -223,13 +223,13 @@ void xwm_selection_finish(struct wlr_xwm *xwm) {
}
if (xwm->seat) {
if (xwm->seat->selection_source &&
wlr_data_source_is_xwayland_data_source(
data_source_is_xwayland(
xwm->seat->selection_source)) {
wlr_seat_set_selection(xwm->seat, NULL,
wl_display_next_serial(xwm->xwayland->wl_display));
}
if (xwm->seat->primary_selection_source &&
wlr_primary_selection_source_is_xwayland_primary_selection_source(
primary_selection_source_is_xwayland(
xwm->seat->primary_selection_source)) {
wlr_seat_set_primary_selection(xwm->seat, NULL,
wl_display_next_serial(xwm->xwayland->wl_display));
@ -262,7 +262,7 @@ static void seat_handle_selection(struct wl_listener *listener,
wl_container_of(listener, xwm, seat_selection);
struct wlr_data_source *source = seat->selection_source;
if (source != NULL && wlr_data_source_is_xwayland_data_source(source)) {
if (source != NULL && data_source_is_xwayland(source)) {
return;
}
@ -277,7 +277,7 @@ static void seat_handle_primary_selection(struct wl_listener *listener,
struct wlr_primary_selection_source *source = seat->primary_selection_source;
if (source != NULL &&
wlr_primary_selection_source_is_xwayland_primary_selection_source(
primary_selection_source_is_xwayland(
source)) {
return;
}

View file

@ -128,7 +128,7 @@ static void exec_xwayland(struct wlr_xwayland *wlr_xwayland) {
execvp("Xwayland", argv);
}
static void wlr_xwayland_finish(struct wlr_xwayland *wlr_xwayland) {
static void xwayland_finish(struct wlr_xwayland *wlr_xwayland) {
if (!wlr_xwayland || wlr_xwayland->display == -1) {
return;
}
@ -165,7 +165,7 @@ static void wlr_xwayland_finish(struct wlr_xwayland *wlr_xwayland) {
*/
}
static bool wlr_xwayland_start(struct wlr_xwayland *wlr_xwayland,
static bool xwayland_start(struct wlr_xwayland *wlr_xwayland,
struct wl_display *wl_display, struct wlr_compositor *compositor);
static void handle_client_destroy(struct wl_listener *listener, void *data) {
@ -176,11 +176,11 @@ static void handle_client_destroy(struct wl_listener *listener, void *data) {
wlr_xwayland->client = NULL;
wl_list_remove(&wlr_xwayland->client_destroy.link);
wlr_xwayland_finish(wlr_xwayland);
xwayland_finish(wlr_xwayland);
if (time(NULL) - wlr_xwayland->server_start > 5) {
wlr_log(L_INFO, "Restarting Xwayland");
wlr_xwayland_start(wlr_xwayland, wlr_xwayland->wl_display,
xwayland_start(wlr_xwayland, wlr_xwayland->wl_display,
wlr_xwayland->compositor);
}
}
@ -217,7 +217,7 @@ static int xserver_handle_ready(int signal_number, void *data) {
wlr_xwayland->xwm = xwm_create(wlr_xwayland);
if (!wlr_xwayland->xwm) {
wlr_xwayland_finish(wlr_xwayland);
xwayland_finish(wlr_xwayland);
return 1;
}
@ -247,7 +247,7 @@ static int xserver_handle_ready(int signal_number, void *data) {
return 1; /* wayland event loop dispatcher's count */
}
static bool wlr_xwayland_start(struct wlr_xwayland *wlr_xwayland,
static bool xwayland_start(struct wlr_xwayland *wlr_xwayland,
struct wl_display *wl_display, struct wlr_compositor *compositor) {
memset(wlr_xwayland, 0, offsetof(struct wlr_xwayland, seat));
wlr_xwayland->wl_display = wl_display;
@ -261,13 +261,13 @@ static bool wlr_xwayland_start(struct wlr_xwayland *wlr_xwayland,
wlr_xwayland->display = open_display_sockets(wlr_xwayland->x_fd);
if (wlr_xwayland->display < 0) {
wlr_xwayland_finish(wlr_xwayland);
xwayland_finish(wlr_xwayland);
return false;
}
if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, wlr_xwayland->wl_fd) != 0 ||
socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, wlr_xwayland->wm_fd) != 0) {
wlr_log_errno(L_ERROR, "failed to create socketpair");
wlr_xwayland_finish(wlr_xwayland);
xwayland_finish(wlr_xwayland);
return false;
}
@ -275,7 +275,7 @@ static bool wlr_xwayland_start(struct wlr_xwayland *wlr_xwayland,
if (!(wlr_xwayland->client = wl_client_create(wl_display, wlr_xwayland->wl_fd[0]))) {
wlr_log_errno(L_ERROR, "wl_client_create failed");
wlr_xwayland_finish(wlr_xwayland);
xwayland_finish(wlr_xwayland);
return false;
}
@ -323,7 +323,7 @@ static bool wlr_xwayland_start(struct wlr_xwayland *wlr_xwayland,
}
if (wlr_xwayland->pid < 0) {
wlr_log_errno(L_ERROR, "fork failed");
wlr_xwayland_finish(wlr_xwayland);
xwayland_finish(wlr_xwayland);
return false;
}
@ -340,7 +340,7 @@ static bool wlr_xwayland_start(struct wlr_xwayland *wlr_xwayland,
void wlr_xwayland_destroy(struct wlr_xwayland *wlr_xwayland) {
wlr_xwayland_set_seat(wlr_xwayland, NULL);
wlr_xwayland_finish(wlr_xwayland);
xwayland_finish(wlr_xwayland);
free(wlr_xwayland);
}
@ -350,7 +350,7 @@ struct wlr_xwayland *wlr_xwayland_create(struct wl_display *wl_display,
wl_signal_init(&wlr_xwayland->events.new_surface);
wl_signal_init(&wlr_xwayland->events.ready);
if (wlr_xwayland_start(wlr_xwayland, wl_display, compositor)) {
if (xwayland_start(wlr_xwayland, wl_display, compositor)) {
return wlr_xwayland;
}
free(wlr_xwayland);
@ -380,7 +380,7 @@ void wlr_xwayland_set_cursor(struct wlr_xwayland *wlr_xwayland,
wlr_xwayland->cursor->hotspot_y = hotspot_y;
}
static void wlr_xwayland_handle_seat_destroy(struct wl_listener *listener,
static void xwayland_handle_seat_destroy(struct wl_listener *listener,
void *data) {
struct wlr_xwayland *xwayland =
wl_container_of(listener, xwayland, seat_destroy);
@ -404,6 +404,6 @@ void wlr_xwayland_set_seat(struct wlr_xwayland *xwayland,
return;
}
xwayland->seat_destroy.notify = wlr_xwayland_handle_seat_destroy;
xwayland->seat_destroy.notify = xwayland_handle_seat_destroy;
wl_signal_add(&seat->events.destroy, &xwayland->seat_destroy);
}

View file

@ -278,7 +278,7 @@ static void xsurface_set_net_wm_state(struct wlr_xwayland_surface *xsurface) {
static void xsurface_unmap(struct wlr_xwayland_surface *surface);
static void wlr_xwayland_surface_destroy(
static void xwayland_surface_destroy(
struct wlr_xwayland_surface *xsurface) {
xsurface_unmap(xsurface);
@ -708,7 +708,7 @@ static void xwm_handle_destroy_notify(struct wlr_xwm *xwm,
if (xsurface == NULL) {
return;
}
wlr_xwayland_surface_destroy(xsurface);
xwayland_surface_destroy(xsurface);
}
static void xwm_handle_configure_request(struct wlr_xwm *xwm,
@ -1304,10 +1304,10 @@ void xwm_destroy(struct wlr_xwm *xwm) {
#endif
struct wlr_xwayland_surface *xsurface, *tmp;
wl_list_for_each_safe(xsurface, tmp, &xwm->surfaces, link) {
wlr_xwayland_surface_destroy(xsurface);
xwayland_surface_destroy(xsurface);
}
wl_list_for_each_safe(xsurface, tmp, &xwm->unpaired_surfaces, link) {
wlr_xwayland_surface_destroy(xsurface);
xwayland_surface_destroy(xsurface);
}
wl_list_remove(&xwm->compositor_new_surface.link);
wl_list_remove(&xwm->compositor_destroy.link);