Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!hydroplane.cis.ohio-state.edu!thitt From: thitt@hydroplane.cis.ohio-state.edu (Todd A Hitt) Newsgroups: comp.sys.mac.programmer Subject: Terminal Emulator DA & ScrollRect Message-ID: <52215@tut.cis.ohio-state.edu> Date: 17 Jun 89 04:08:38 GMT Sender: news@tut.cis.ohio-state.edu Reply-To: Distribution: usa Organization: Ohio State University Computer and Information Science Lines: 38 I've been working for some time on a VT220 emulator Desk Accessory and am nearing another release. However, I have a problem: I use ScrollRect to scroll the screen when necessary. Currently, I ignore the region that is returned (updateRgn). This works fine and dandy as long as the DA's window is not-occluded. I would like to update the updateRgn except for the rectangle that doesn't need updated without paying large performance penalties. I've tried tactics and have all failed miserably. First I tried InvalRgn. Unfortunately, by the time the ToolBox Event manager had got around sending an UpdateEvent, I've already scrolled again. This results in a mess. So, I tried re-drawing on the fly. This worked better, but... My algorithm is smart enough not to redraw anything if the window isn't occluded. However, when the window is occluded, the rate I can service serial input appears to slow down by about a factor of 100. At this point in time, I only have two options left: 1. Simply redraw the whole window when it is activated. 2. Redraw the whole window when I got a call to accRun and there isn't any serial input for a period of time. Both of these options are unattactive. I know a solution exists. Smartcom does it OK. Ideas? Help!! -=- Todd Hitt thitt@cis.ohio-state.edu Battelle Columbus/Ohio State hitt%36.114@ohstpy.mps.ohio-state.edu (614)424-3297 "You were not put on this earth to 'Get It'" - "Lo Pan" in Big Trouble in Little China