fix for vertical stacked monitors

This commit is contained in:
Arda Atci
2023-09-30 01:35:52 +03:00
parent 2241c7d87a
commit 98e842e83b

View File

@@ -2779,7 +2779,10 @@ bool win_skip_fading(session_t *ps, struct managed_win *w) {
void win_update_monitor(struct x_monitors *monitors, struct managed_win *mw) {
for (int i = 0; i < monitors->count; i++) {
auto e = pixman_region32_extents(&monitors->regions[i]);
if ((e->x1 <= mw->g.x || e->x1 <= mw->pending_g.x) && (e->x2 >= mw->g.x + mw->widthb || e->x2 >= mw->pending_g.x + mw->widthb)) {
if (((e->x1 <= mw->g.x || e->x1 <= mw->pending_g.x) &&
(e->x2 >= mw->g.x + mw->widthb || e->x2 >= mw->pending_g.x + mw->widthb)) &&
(e->y1 <= mw->g.y || e->y1 <= mw->pending_g.y) &&
(e->y2 >= mw->g.y + mw->heightb || e->y2 >= mw->pending_g.y + mw->heightb)) {
mw->randr_monitor = i;
log_debug("Window %#010x (%s), %dx%d+%dx%d, is entirely on the "
"monitor %d (%dx%d+%dx%d)",