From: Paul Sprangers Subject: Wimp_RedrawWindow protocols Newsgroups: comp.sys.acorn.programmer Date: Sat, 16 Apr 2022 12:57:03 +0200 (Custom) Message-ID: <59da004dcaPaul@sprie.nl> User-Agent: Pluto/3.18 (RISC OS/5.29) NewsHound/v1.52-32 Organization: None Path: csiph.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe004.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail Lines: 43 Injection-Date: Sat, 16 Apr 2022 12:59:31 +0200 Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com" X-Received-Bytes: 2180 Xref: csiph.com comp.sys.acorn.programmer:6360 [This topic is a spin off from elsewhere] In article , Steve Fryatt wrote: > > > When a Wimp_Poll returns reason code 1 (RedrawWindow), then > > > Wimp_RedrawWindow must be the first Wimp call made, and it should > > > not be called at any other time. > > Ah, now I understand what you mean - and I sin against that rule > > indeed. Before calling Wimp_RedrawWindow, I do a Wimp_GetWindowInfo > > call. Should I really move that one after the redraw call? > What details do you need to find from Wimp_GetWindowInfo to perform the > redraw, that you don't get in the block returned by Wimp_RedrawWindow and > Wimp_GetRectangle? > > If I do, things go horribly wrong. > Define "horribly wrong"... which might help us help you. :-) Horribly wrong in this case means that I get a 'Number too big' error in another subroutine when opening the application window. The details that I get from Wimp_GetWindowInfo is the x and y origins of the window in question: SYS "Wimp_GetWindowInfo",,block% ox% = block%!4 - block%!20 oy% = block%!16 - block%!24 However, I noticed that I can move the latter two lines to within the WHILE more% - ENDWHILE loop and delete the Wimp_GetWindowInfo call, so that the RedrawWindow call is the first one in the redraw routine. Unfortunately, it doesn't change anything about some other glitches, that probably have nothing to do with the redraw routine, but the more so with my general and ubiquitous flaws. Paul -- http://riscos.sprie.nl