From 4751d7388d3c7ecf1084747ae0b7da79691fc696 Mon Sep 17 00:00:00 2001 From: bakkeby Date: Tue, 30 Mar 2021 13:13:15 +0200 Subject: [PATCH] Proposed fix to address behaviour when resizing clients using the -1Z anchor ref. #103 --- patch/floatpos.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/patch/floatpos.c b/patch/floatpos.c index 5d3947a..d481fbc 100644 --- a/patch/floatpos.c +++ b/patch/floatpos.c @@ -157,8 +157,6 @@ getfloatpos(int pos, char pCh, int size, char sCh, int min_p, int max_s, int cp, case 'W': // normal size, position takes precedence if (pCh == 'S' && cp + size > min_p + max_s) size = min_p + max_s - cp; - else if (pCh == 'Z' && size > cp - max_s) - size = cp - min_p; else if (size > max_s) size = max_s; @@ -170,7 +168,8 @@ getfloatpos(int pos, char pCh, int size, char sCh, int min_p, int max_s, int cp, cp = min_p; else if (delta) cp = min_p + max_s; - } + } else if (pCh == 'Z') + cp -= size - cs; cs = size; break;