aboutsummaryrefslogtreecommitdiff
path: root/client.h
diff options
context:
space:
mode:
authorPalanix <palanixyt@gmail.com>2022-08-31 06:11:07 +0200
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-12-03 13:14:10 -0600
commit017bb7d7521f68d37bfe656c10f45edbcc92dd61 (patch)
treee6a28a359c67f32f0507c8f92bd3685ed431f73e /client.h
parentfac3b6f2cf7e2d5e9de2b0618a5a2ad2e0809b03 (diff)
fix flickering when resizing/spawning windows
Fixes: https://github.com/djpohly/dwl/issues/306
Diffstat (limited to 'client.h')
-rw-r--r--client.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/client.h b/client.h
index c18d01a..4dc9e1a 100644
--- a/client.h
+++ b/client.h
@@ -198,6 +198,21 @@ client_is_mapped(Client *c)
}
static inline int
+client_is_rendered_on_mon(Client *c, Monitor *m)
+{
+ /* This is needed for when you don't want to check formal assignment,
+ * but rather actual displaying of the pixels.
+ * Usually VISIBLEON suffices and is also faster. */
+ struct wlr_surface_output *s;
+ if (!c->scene->node.enabled)
+ return 0;
+ wl_list_for_each(s, &client_surface(c)->current_outputs, link)
+ if (s->output == m->wlr_output)
+ return 1;
+ return 0;
+}
+
+static inline int
client_is_unmanaged(Client *c)
{
#ifdef XWAYLAND