diff options
author | emersion <contact@emersion.fr> | 2018-04-08 12:02:52 -0400 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-04-08 12:02:52 -0400 |
commit | c55ad11d96f91de2d3b0f351a7da8d455accc604 (patch) | |
tree | 708427d5d180abdcbacaa6590a0118e9e3416e8f /xwayland | |
parent | bef5c1fd56a386745e76346ed2d9df5ba3baa40c (diff) |
xwayland: add _NET_WM_WINDOW_TYPE_MENU support
Diffstat (limited to 'xwayland')
-rw-r--r-- | xwayland/xwayland.c | 21 | ||||
-rw-r--r-- | xwayland/xwm.c | 24 |
2 files changed, 24 insertions, 21 deletions
diff --git a/xwayland/xwayland.c b/xwayland/xwayland.c index 765e17d0..bdb2c0d6 100644 --- a/xwayland/xwayland.c +++ b/xwayland/xwayland.c @@ -405,24 +405,3 @@ 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 (xwm_atoms_contains(surface->xwm, surface->window_type, - surface->window_type_len, needles[i])) { - return true; - } - } - - return false; -} diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 886fe251..6b1038cf 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -52,12 +52,14 @@ const char *atom_map[ATOM_LAST] = { "TEXT", "TIMESTAMP", "DELETE", + "_NET_WM_WINDOW_TYPE_NORMAL", "_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", + "_NET_WM_WINDOW_TYPE_MENU", "XdndSelection", "XdndAware", "XdndStatus", @@ -1575,3 +1577,25 @@ bool xwm_atoms_contains(struct wlr_xwm *xwm, xcb_atom_t *atoms, return false; } + +bool wlr_xwayland_surface_is_unmanaged( + const struct wlr_xwayland_surface *surface) { + static enum atom_name needles[] = { + NET_WM_WINDOW_TYPE_COMBO, + NET_WM_WINDOW_TYPE_DND, + NET_WM_WINDOW_TYPE_DROPDOWN_MENU, + NET_WM_WINDOW_TYPE_MENU, + NET_WM_WINDOW_TYPE_POPUP_MENU, + NET_WM_WINDOW_TYPE_TOOLTIP, + NET_WM_WINDOW_TYPE_UTILITY, + }; + + for (size_t i = 0; i < sizeof(needles) / sizeof(needles[0]); ++i) { + if (xwm_atoms_contains(surface->xwm, surface->window_type, + surface->window_type_len, needles[i])) { + return true; + } + } + + return false; +} |