From 2910972b25a211ecd07c605d4bf93897ef5f715a Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Sun, 4 Mar 2018 11:16:14 +0100 Subject: xwm.h: fix guard ifdef and remove wlr_ prefix from xwm_atoms_contains --- include/xwayland/xwm.h | 6 +++--- xwayland/xwayland.c | 2 +- xwayland/xwm.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/xwayland/xwm.h b/include/xwayland/xwm.h index e918ac11..4b15cc84 100644 --- a/include/xwayland/xwm.h +++ b/include/xwayland/xwm.h @@ -1,5 +1,5 @@ -#ifndef WLR_XWM_H -#define WLR_XWM_H +#ifndef XWAYLAND_XWM_H +#define XWAYLAND_XWM_H #include #include @@ -129,7 +129,7 @@ void xwm_selection_finish(struct wlr_xwm *xwm); void xwm_set_seat(struct wlr_xwm *xwm, struct wlr_seat *seat); -bool wlr_xwm_atoms_contains(struct wlr_xwm *xwm, xcb_atom_t *atoms, +bool xwm_atoms_contains(struct wlr_xwm *xwm, xcb_atom_t *atoms, size_t num_atoms, enum atom_name needle); #endif diff --git a/xwayland/xwayland.c b/xwayland/xwayland.c index d49dd718..765e17d0 100644 --- a/xwayland/xwayland.c +++ b/xwayland/xwayland.c @@ -418,7 +418,7 @@ bool wlr_xwayland_surface_is_unmanaged(const struct wlr_xwayland_surface *surfac }; for (size_t i = 0; i < sizeof(needles) / sizeof(needles[0]); ++i) { - if (wlr_xwm_atoms_contains(surface->xwm, surface->window_type, + if (xwm_atoms_contains(surface->xwm, surface->window_type, surface->window_type_len, needles[i])) { return true; } diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 9210033a..8911c553 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -1519,7 +1519,7 @@ void wlr_xwayland_surface_set_fullscreen(struct wlr_xwayland_surface *surface, xcb_flush(surface->xwm->xcb_conn); } -bool wlr_xwm_atoms_contains(struct wlr_xwm *xwm, xcb_atom_t *atoms, +bool xwm_atoms_contains(struct wlr_xwm *xwm, xcb_atom_t *atoms, size_t num_atoms, enum atom_name needle) { xcb_atom_t atom = xwm->atoms[needle]; -- cgit v1.2.3