diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-07-29 10:49:29 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-29 10:49:29 -0400 |
commit | 5734d0530c7e320860013cb9465a2e15f5238fb6 (patch) | |
tree | 564e8c86293ac44fdebe523945502ea1782fad5c /xwayland | |
parent | f572bc065ec82cc469a98e85158fa0fc9ed70c64 (diff) | |
parent | 81cc842f8f27461742710b4195443da64c7bfeef (diff) |
Merge pull request #1165 from Ongy/reintroduce_is_unmanaged
reintroduce xwayland is_unmanaged
Diffstat (limited to 'xwayland')
-rw-r--r-- | xwayland/xwm.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 7999480a..c939d8ea 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -1703,3 +1703,27 @@ void wlr_xwayland_surface_ping(struct wlr_xwayland_surface *surface) { surface->xwm->ping_timeout); surface->pinging = true; } + +bool wlr_xwayland_or_surface_wants_focus( + const struct wlr_xwayland_surface *surface) { + bool ret = true; + 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_NOTIFICATION, + NET_WM_WINDOW_TYPE_POPUP_MENU, + NET_WM_WINDOW_TYPE_SPLASH, + 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])) { + ret = false; + } + } + + return ret; +} |