From ea4c3d8a009e596aaabf2eeb2029201dd5664693 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 28 Nov 2002 21:02:07 +0000 Subject: [PATCH] Follow the recommendations in Tech Note TB575 for clipping off the space for the horizontal scroll bar when drawing the grow box. git-svn-id: svn://svn.tartarus.org/sgt/putty@2262 cda61777-01e9-0310-a592-d414129be87e --- mac/macterm.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/mac/macterm.c b/mac/macterm.c index 7679be98..cde046ff 100644 --- a/mac/macterm.c +++ b/mac/macterm.c @@ -1,4 +1,4 @@ -/* $Id: macterm.c,v 1.13 2002/11/28 00:25:09 ben Exp $ */ +/* $Id: macterm.c,v 1.14 2002/11/28 21:02:07 ben Exp $ */ /* * Copyright (c) 1999 Simon Tatham * Copyright (c) 1999, 2002 Ben Harris @@ -779,15 +779,21 @@ void mac_updateterm(WindowPtr window) { static void mac_drawgrowicon(Session *s) { Rect clip; + RgnHandle savergn; SetPort(s->window); - /* Stop DrawGrowIcon giving us space for a horizontal scrollbar */ - SetRect(&clip, s->window->portRect.right - 15, SHRT_MIN, - SHRT_MAX, SHRT_MAX); + /* + * Stop DrawGrowIcon giving us space for a horizontal scrollbar + * See Tech Note TB575 for details. + */ + clip = s->window->portRect; + clip.left = clip.right - 15; + savergn = NewRgn(); + GetClip(savergn); ClipRect(&clip); DrawGrowIcon(s->window); - clip.left = SHRT_MIN; - ClipRect(&clip); + SetClip(savergn); + DisposeRgn(savergn); } struct do_text_args { -- 2.11.0