shod

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 5360e2353cea36ab056a7c5e4de642b6c4f6fb31
parent e8a90d74180650fc7d6b69ce4e02143e7ee67aec
Author: Lucas de Sena <lucas@seninha.org>
Date:   Tue, 22 Aug 2023 13:10:21 -0300

ignore off screen part of window

If window is partially off screen, ignore the hidden part for computing
whether it is obscured.  This can be ignored with -h.

Diffstat:
Mxhints.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/xhints.c b/xhints.c @@ -30,6 +30,10 @@ getwinname(Window win) static int isobscured(struct Container *c, struct Monitor *mon, int desk, int x, int y, int w, int h) { + x = max(x, mon->wx); + y = max(y, mon->wy); + w = min(x + w, mon->wx + mon->ww) - x; + h = min(y + h, mon->wy + mon->wh) - y; if (config.disablehidden || c == NULL) return 0; if (w <= 0 || h <= 0)