A minor bug has been bothering me for a long time. When you maximize a borderless window in Window Maker, the window ends up too narrow and too short by two pixels. I've attached a patch against CVS to fix the problem.
Submitted by: Gilbert Ashley <[email protected]> Author: David Benbennick <[email protected]> 1 file changed, 6 insertions(+), 2 deletions(-) src/actions.c | 8 ++++++--
# HG changeset patch # User John H. Robinson, IV <[email protected]> # Date 1229205014 28800 # Node ID 568fbe68047b9cca96d6eb064de109ab8b562e06 # Parent c7f5a6b63d02603bd2207115d5ac75f33377ea98 Maximize borderless fix missing pixels A minor bug has been bothering me for a long time. When you maximize a borderless window in Window Maker, the window ends up too narrow and too short by two pixels. I've attached a patch against CVS to fix the problem. Submitted by: Gilbert Ashley <[email protected]> Author: David Benbennick <[email protected]> diff --git a/src/actions.c b/src/actions.c --- a/src/actions.c +++ b/src/actions.c @@ -428,7 +428,9 @@ wwin->flags.maximized = directions; if (directions & MAX_HORIZONTAL) { - new_width = (usableArea.x2-usableArea.x1)-FRAME_BORDER_WIDTH*2; + new_width = usableArea.x2 - usableArea.x1; + if (HAS_BORDER(wwin)) + new_width -= FRAME_BORDER_WIDTH * 2; new_x = usableArea.x1; } else if (shrink_h) { new_x = wwin->old_geometry.x; @@ -439,7 +441,9 @@ } if (directions & MAX_VERTICAL) { - new_height = (usableArea.y2-usableArea.y1)-FRAME_BORDER_WIDTH*2; + new_height = usableArea.y2 - usableArea.y1; + if (HAS_BORDER(wwin)) + new_height -= FRAME_BORDER_WIDTH * 2; new_y = usableArea.y1; if (WFLAGP(wwin, full_maximize)) { new_y -= wwin->frame->top_width;
