This reverts commit 017bb7d7521f68d37bfe656c10f45edbcc92dd61.
Bug: https://github.com/djpohly/dwl/issues/349
DOAVC3LT57GMBA57JQ2SBLR6KGKYBX2CE6KYAELRFF5XQQ67DAIAC
HLSR6YZSOCJGJAA457QC6SID4VELZ7WGKQIAI44IKPDBMRGSYR3QC
JBMVBMPCH5JMMLQP4T2STHNG3FTNNPQUAMAR4U3GP2RV6K4QWUIQC
7L3TU7JVWPBPHN7WF4TJ263BZ6BC3AYRRW6PULFUP5JZUGWWNUSAC
7B74AT3BXYB7PVW4F6SGQNPMHOU5TEV5TZ54CG6VSQI46XSEKWXQC
EQRGODLKSVSPFSUZU7BV5ER72U4QS4ATSBKV544XXQVKKTOSC7EAC
7EY3YPO43GHF3LWNI3UZKMMT65UO6DK4LA2X2UC25PAA77KVGSIQC
2GP4MXKEDQMZ7E6TCRSMV2AGN7HLEAHR3QEAC2QFCQQNPMNJSIHQC
wl_list_for_each(c, &clients, link)
if (client_is_rendered_on_mon(c, m) && (!c->isfloating && c->resize))
goto skip;
if (!wlr_scene_output_commit(m->scene_output))
/* Checking m->un_map for every client is not optimal but works */
wl_list_for_each(c, &clients, link) {
if ((c->resize && m->un_map) || (c->type == XDGShell
&& (c->surface.xdg->pending.geometry.width !=
c->surface.xdg->current.geometry.width
|| c->surface.xdg->pending.geometry.height !=
c->surface.xdg->current.geometry.height))) {
/* Lie */
wlr_surface_send_frame_done(client_surface(c), &now);
skip = 1;
}
}
if (!skip && !wlr_scene_output_commit(m->scene_output))
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