diff options
author | Leonardo Hernández Hernández <leohdz172@proton.me> | 2023-04-12 21:37:19 -0600 |
---|---|---|
committer | Leonardo Hernández Hernández <leohdz172@proton.me> | 2023-04-13 13:12:27 -0600 |
commit | 797e0c74b2cbf4a49f83c9269abec06f3293d00c (patch) | |
tree | 3fb737b28badd311fd92c66528e71d9b1a890151 | |
parent | 3c760bcd4ae640ec27229da8c75e9539bfd0d5cc (diff) |
correctly check if a scene node is enabled
checking only wlr_scene_node.enabled may result in a false positive because it
does not consider if its ancestors are enabled as well.
-rw-r--r-- | dwl.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -631,13 +631,13 @@ chvt(const Arg *arg) void checkidleinhibitor(struct wlr_surface *exclude) { - int inhibited = 0; + int inhibited = 0, unused_lx, unused_ly; struct wlr_idle_inhibitor_v1 *inhibitor; wl_list_for_each(inhibitor, &idle_inhibit_mgr->inhibitors, link) { struct wlr_surface *surface = wlr_surface_get_root_surface(inhibitor->surface); struct wlr_scene_tree *tree = surface->data; if (exclude != surface && (bypass_surface_visibility || (!tree - || tree->node.enabled))) { + || wlr_scene_node_coords(&tree->node, &unused_lx, &unused_ly)))) { inhibited = 1; break; } @@ -1201,7 +1201,7 @@ void focusclient(Client *c, int lift) { struct wlr_surface *old = seat->keyboard_state.focused_surface; - int i; + int i, unused_lx, unused_ly; if (locked) return; @@ -1236,7 +1236,7 @@ focusclient(Client *c, int lift) Client *w = NULL; LayerSurface *l = NULL; int type = toplevel_from_wlr_surface(old, &w, &l); - if (type == LayerShell && l->scene->node.enabled + if (type == LayerShell && wlr_scene_node_coords(&l->scene->node, &unused_lx, &unused_ly) && l->layer_surface->current.layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP) { return; } else if (w && w == exclusive_focus && client_wants_focus(w)) { |