Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!uhccux!virtue!ccc_ldo From: ccc_ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) Newsgroups: comp.sys.mac.programmer Subject: Re: Forcing a screen update. Message-ID: <1440.26e3ba3a@waikato.ac.nz> Date: 4 Sep 90 02:29:13 GMT References: <7007@milton.u.washington.edu> <1320@radius.com> Distribution: comp.sys.mac.programmer Organization: University of Waikato, Hamilton, New Zealand Lines: 37 Here's an FKEY I wrote in my pre-MPW days (it's in MDS Assembler), which forces a redraw of the screen, apart from the menu bar. If you want to update that as well, just add a call to _DrawMenuBar somewhere. ;+ ; This simple FKEY forces the desktop and all windows to ; be redrawn. It is useful after running non-MultiFinder- ; friendly programs which write directly to the screen. ; ; Written by Lawrence D'Oliveiro 1988 August 6. ; Modified 1988 October 17 to save and restore current grafPort ; (zapped by PaintOne, which is called by PaintBehind) ;- include ToolEquX.D include Traps.D Resource 'FKEY' 9 'Refresh screen' 32 clr.l -(sp) ; space to save current port pea (sp) ; pointer to space _GetPort clr.l -(sp) _FrontWindow move.l GrayRgn, -(sp) _PaintBehind _SetPort rts end Lawrence D'Oliveiro fone: +64-71-562-889 Computer Services Dept fax: +64-71-384-066 University of Waikato electric mail: ldo@waikato.ac.nz Hamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00 "Look! We're being attacked by hostile pipe-welders!" -- John Candy in "It Came From Hollywood"