Follow the recommendations in Tech Note TB575 for clipping off the space
authorben <ben@cda61777-01e9-0310-a592-d414129be87e>
Thu, 28 Nov 2002 21:02:07 +0000 (21:02 +0000)
committerben <ben@cda61777-01e9-0310-a592-d414129be87e>
Thu, 28 Nov 2002 21:02:07 +0000 (21:02 +0000)
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

index 7679be9..cde046f 100644 (file)
@@ -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 {