[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TaskMaster and Scrolling
In article <9302231603.aa11811@Bonnie.ics.uci.edu> Joseph T. Lee,
jlee@Bonnie.ICS.UCI.EDU writes:
>The problem is that when I click on the horizontal and vertical scroll
>controls of the window, the picture won't respond (i.e. scroll). I
stepped
>through the code using the Orca/C v1.3.2 debugger and there seems to be
>nothing wrong. But running the code at full speed and this bug pops up.
>
>Taskmaster is set to handle scrolling and the frame bits for the scroll
bars
>are set. Scrolling only seems to work after I click on the drag region.
>If I just click on the window to make it active (anywhere but title
region)
>or resize the window, the bug pops up its ugly head. :(
>
>I've patched this bug by putting a function in the idle part of the event
>loop that grabs the front window calls BringToFront().
>
>If someone could please explain to me WHY? about this bug or how to
>SQUASH it, please do.
I don't see anything obviously wrong with your code, but then that was a
fair-sized code segment, and your problem could easily be in some code
that you didn't post.
Try checking that you always return your windows' origins to (0,0) using
SetOrigin, after you're done drawing & before you return to the
TaskMaster loop. Your visRgns will appreciate this very much. (A
StartDrawing call sets your origin to correspond to your scroll bars, so
normall a StartDrawing is paired with a SetOrigin(0,0) later.)
David A. Lyons, Apple Computer, Inc. | DAL Systems
Apple II System Software Engineer | P.O. Box 875
Internet:dlyons@apple.com | Cupertino, CA 95015-0875
My opinions are my own, not Apple's.