diff options
| author | Palanix <palanixyt@gmail.com> | |
|---|---|---|
| 2022-08-31 06:11:07 +0200 | ||
| committer | Leonardo Hernández Hernández <leohdz172@protonmail.com> | |
| 2022-12-03 13:14:10 -0600 | ||
| commit | 017bb7d7521f68d37bfe656c10f45edbcc92dd61 (patch) | |
| tree | e6a28a359c67f32f0507c8f92bd3685ed431f73e /client.h | |
| parent | fac3b6f2cf7e2d5e9de2b0618a5a2ad2e0809b03 (diff) | |
| download | dwl-017bb7d7521f68d37bfe656c10f45edbcc92dd61.tar.gz dwl-017bb7d7521f68d37bfe656c10f45edbcc92dd61.tar.bz2 dwl-017bb7d7521f68d37bfe656c10f45edbcc92dd61.zip | |
fix flickering when resizing/spawning windows
Fixes: https://github.com/djpohly/dwl/issues/306
@@ -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 |