aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2020-04-26 20:00:06 -0500
committerDevin J. Pohly <djpohly@gmail.com>2020-04-26 20:00:06 -0500
commitb025b7bdbd88e2409b60e7969dfa9905943f4cd1 (patch)
tree99edec1c995bd8aeaf728e21ffed488d159980d3
parentaa7020b344f83f0c64897f464021d9bc23790f05 (diff)
render windows across monitors
-rw-r--r--dwl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/dwl.c b/dwl.c
index f32b163..5ec5493 100644
--- a/dwl.c
+++ b/dwl.c
@@ -855,10 +855,12 @@ renderclients(Monitor *m, struct timespec *now)
* our stacking list is ordered front-to-back, we iterate over it backwards. */
Client *c;
wl_list_for_each_reverse(c, &stack, slink) {
- /* Only render clients which are on this monitor. */
- /* XXX consider checking wlr_output_layout_intersects, in case a
- * window can be seen on multiple outputs */
- if (!VISIBLEON(c, m))
+ /* Only render visible clients which show on this monitor */
+ struct wlr_box cbox = {
+ .x = c->x, .y = c->y, .width = c->w, .height = c->h,
+ };
+ if (!VISIBLEON(c, c->mon) || !wlr_output_layout_intersects(
+ output_layout, m->wlr_output, &cbox))
continue;
double ox = c->x, oy = c->y;