opt: UTILITY type x11 window layer should over top layer

This commit is contained in:
DreamMaoMao 2025-07-08 12:15:31 +08:00
parent cee0d0fd80
commit 38dccbe4b4
2 changed files with 29 additions and 16 deletions

View file

@ -397,6 +397,25 @@ static inline int client_should_ignore_focus(Client *c) {
return 0;
}
static inline int client_should_overtop(Client *c) {
#ifdef XWAYLAND
if (client_is_x11(c)) {
struct wlr_xwayland_surface *surface = c->surface.xwayland;
const uint32_t over_top_types[] = {
WLR_XWAYLAND_NET_WM_WINDOW_TYPE_UTILITY};
for (size_t i = 0;
i < sizeof(over_top_types) / sizeof(over_top_types[0]); ++i) {
if (wlr_xwayland_surface_has_window_type(surface,
over_top_types[i])) {
return 1;
}
}
}
#endif
return 0;
}
static inline int client_wants_focus(Client *c) {
#ifdef XWAYLAND
return client_is_unmanaged(c) &&