Simplify client y-offset correction a859676e
The reasoning behind the original line may be lost to time as
it does not make much sense checking the position on the x-axis
to determine how to position the client on the y-axis.

In the context of multi-monitor setups the monitor y position
(m->my) may be greater than 0 (say 500), in which case the window
could be placed out of view if:
   - the window attributes have a 0 value for the y position and
   - we end up using the y position of bh (e.g. 22)

If the aim is to avoid a new floating client covering the bar then
restricting y position to be at least that of the window area
(m->wy) should cover the two cases of using a top bar and using a
bottom bar.
Stein · 2022-08-09 10:38 1 file(s) · +1 −3
dwm.c +1 −3
1049 1049
	if (c->y + HEIGHT(c) > c->mon->my + c->mon->mh)
1050 1050
		c->y = c->mon->my + c->mon->mh - HEIGHT(c);
1051 1051
	c->x = MAX(c->x, c->mon->mx);
1052 -
	/* only fix client y-offset, if the client center might cover the bar */
1053 -
	c->y = MAX(c->y, ((c->mon->by == c->mon->my) && (c->x + (c->w / 2) >= c->mon->wx)
1054 -
		&& (c->x + (c->w / 2) < c->mon->wx + c->mon->ww)) ? bh : c->mon->my);
1052 +
	c->y = MAX(c->y, c->mon->wy);
1055 1053
	c->bw = borderpx;
1056 1054
1057 1055
	wc.border_width = c->bw;