summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2019-07-16 16:55:25 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2019-07-16 16:55:25 -0400
commit6b4b0fb50a75d9336a123899138cc479d6d9765d (patch)
tree8b0f0e305a9c137f44123a01c8b852768f6531c7
parent9cf220752302be2ac965cfefdd0a0c29b3db19e2 (diff)
issue 4: twm makes windows too wide
https://gitlab.freedesktop.org/xorg/app/twm/issues/4 patch submitted by Jes Bodi Klinke Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
-rw-r--r--src/add_window.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/add_window.c b/src/add_window.c
index 74fd7bf..cb5be4e 100644
--- a/src/add_window.c
+++ b/src/add_window.c
@@ -658,8 +658,8 @@ AddWindow(Window w, int iconm, IconMgr *iconp)
}
else if (event.xbutton.button == Button3)
{
- int maxw = Scr->MyDisplayWidth - AddingX - bw2;
- int maxh = Scr->MyDisplayHeight - AddingY - bw2;
+ int maxw = Scr->MyDisplayWidth - AddingX;
+ int maxh = Scr->MyDisplayHeight - AddingY;
/*
* Make window go to bottom of screen, and clip to right edge.
@@ -669,6 +669,8 @@ AddWindow(Window w, int iconm, IconMgr *iconp)
if (AddingW > maxw) AddingW = maxw;
AddingH = maxh;
+ AddingW -= bw2;
+ AddingH -= bw2;
ConstrainSize (tmp_win, &AddingW, &AddingH); /* w/o borders */
AddingW += bw2;
AddingH += bw2;