diff options
author | emersion <contact@emersion.fr> | 2018-02-27 09:47:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-27 09:47:23 +0100 |
commit | c2ba1869ce0ffd0e21238c8a4454ac29215ff7d0 (patch) | |
tree | 87c2ea4b7a0a75f21a3868e554bb50df1015615a /xwayland/xwayland.c | |
parent | 1171368cfca8e0af9a047d71cbcd40343b486db1 (diff) | |
parent | bb676013ed1b1b48847694a2159e3b009636b181 (diff) |
Merge pull request #670 from Ongy/xwayland_unmanaged
add xwayland unmanaged tests to support dmenu
Diffstat (limited to 'xwayland/xwayland.c')
-rw-r--r-- | xwayland/xwayland.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/xwayland/xwayland.c b/xwayland/xwayland.c index 1d935180..8dffd040 100644 --- a/xwayland/xwayland.c +++ b/xwayland/xwayland.c @@ -405,3 +405,24 @@ void wlr_xwayland_set_seat(struct wlr_xwayland *xwayland, xwayland->seat_destroy.notify = wlr_xwayland_handle_seat_destroy; wl_signal_add(&seat->events.destroy, &xwayland->seat_destroy); } + + +bool wlr_xwayland_surface_is_unmanaged(const struct wlr_xwayland_surface *surface) { + static enum atom_name needles[] = { + 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, + }; + + for (size_t i = 0; i < sizeof(needles) / sizeof(needles[0]); ++i) { + if (wlr_xwm_atoms_contains(surface->xwm, surface->window_type, + surface->window_type_len, needles[i])) { + return true; + } + } + + return false; +} |