aboutsummaryrefslogtreecommitdiff
path: root/xwayland/xwm.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-02-27 09:47:23 +0100
committerGitHub <noreply@github.com>2018-02-27 09:47:23 +0100
commitc2ba1869ce0ffd0e21238c8a4454ac29215ff7d0 (patch)
tree87c2ea4b7a0a75f21a3868e554bb50df1015615a /xwayland/xwm.c
parent1171368cfca8e0af9a047d71cbcd40343b486db1 (diff)
parentbb676013ed1b1b48847694a2159e3b009636b181 (diff)
Merge pull request #670 from Ongy/xwayland_unmanaged
add xwayland unmanaged tests to support dmenu
Diffstat (limited to 'xwayland/xwm.c')
-rw-r--r--xwayland/xwm.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index 0d957260..c41b8d47 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -54,6 +54,12 @@ const char *atom_map[ATOM_LAST] = {
"INCR",
"TEXT",
"TIMESTAMP",
+ "_NET_WM_WINDOW_TYPE_UTILITY",
+ "_NET_WM_WINDOW_TYPE_TOOLTIP",
+ "_NET_WM_WINDOW_TYPE_DND",
+ "_NET_WM_WINDOW_TYPE_DROPDOWN_MENU",
+ "_NET_WM_WINDOW_TYPE_POPUP_MENU",
+ "_NET_WM_WINDOW_TYPE_COMBO",
};
/* General helpers */
@@ -1446,3 +1452,17 @@ void wlr_xwayland_surface_set_fullscreen(struct wlr_xwayland_surface *surface,
xsurface_set_net_wm_state(surface);
xcb_flush(surface->xwm->xcb_conn);
}
+
+bool wlr_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];
+
+ for (size_t i = 0; i < num_atoms; ++i) {
+ if (atom == atoms[i]) {
+ return true;
+ }
+ }
+
+ return false;
+}
+