summaryrefslogtreecommitdiffhomepage
path: root/patch/exresize.c
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2020-08-27 21:05:34 +0200
committerbakkeby <[email protected]>2020-08-27 21:05:34 +0200
commitc44b14e3dd063cbe85ac152229991411c67de3dc (patch)
tree325799d94b5fc72303f94402b799e84dfbd7f5b6 /patch/exresize.c
parentb3d336322e56637c7e157a44695dab6def2fcb05 (diff)
downloaddwm-flexipatch-c44b14e3dd063cbe85ac152229991411c67de3dc.tar.gz
dwm-flexipatch-c44b14e3dd063cbe85ac152229991411c67de3dc.zip
setborderpx compatibility improvements
Diffstat (limited to 'patch/exresize.c')
-rw-r--r--patch/exresize.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/patch/exresize.c b/patch/exresize.c
index 4d8d4b0..e9786b3 100644
--- a/patch/exresize.c
+++ b/patch/exresize.c
@@ -117,6 +117,11 @@ expand(unsigned char mask)
{
XEvent ev;
int nx1, ny1, nx2, ny2;
+ #if SETBORDERPX_PATCH
+ int bp = selmon->borderpx;
+ #else
+ int bp = borderpx;
+ #endif // SETBORDERPX_PATCH
unsigned char curmask;
unsigned char newmask;
@@ -142,7 +147,7 @@ expand(unsigned char mask)
nx2 = calculate_expand(mask, curmask, &newmask,
EXPAND_RIGHT, &selmon->sel->expandx2,
selmon->sel->x + selmon->sel->w,
- selmon->wx + selmon->ww - 2*borderpx,
+ selmon->wx + selmon->ww - 2*bp,
selmon->sel->oldw + selmon->sel->x);
ny1 = calculate_expand(mask, curmask, &newmask,
EXPAND_UP, &selmon->sel->expandy1,
@@ -152,7 +157,7 @@ expand(unsigned char mask)
ny2 = calculate_expand(mask, curmask, &newmask,
EXPAND_DOWN, &selmon->sel->expandy2,
selmon->sel->y + selmon->sel->h,
- selmon->wy + selmon->wh - 2*borderpx,
+ selmon->wy + selmon->wh - 2*bp,
selmon->sel->oldh + selmon->sel->y);