Damage control by intelligent handling of REDRAW tokens.

Avinash Chopde avinash at contex.UUCP
Tue Dec 4 09:16:06 AEST 1990


Take this scenario: 
  I have a program that fills up a large portion of the console display;
  redrawing that portion completely takes a considerable amount of time.

  Now, this program also brings up a sub-window, that is small in size,
  and is moveable. 
  The sub-window resides on top of the main window of the program.
  (The sub-window and the main window share the event queue.)
  Whenever the sub-window is moved, two REDRAW tokens are generated: one
  for the main window, and one for the sub-window.

  Here is the problem: I do not want to redraw the main window fully,
  only the portion that is uncovered by the movement of the sub-window.

  I would be glad for any pointers to solving the problem.

  The problem can be made more general (more difficult ?) by assuming
  separation of the sub-window into a different process---thus, 
  the two windows do not share the event queue.

------------
  
  A:
  Are there any assumptions I can make regarding the REDRAW tokens ?
  For example, is it guaranteed that if I move a sub-window, the first
  REDRAW token in the queue will refer to the sub-window and the next
  REDRAW token (if needed) will refer to the main-window ?

  B:
  I understand that it may be possible to "control damage" using the
  PostScript NeWS window interface.
  Does anybody have any PostScript sample code to do that (hopefully,
  with a C interface!)
-- 
---------------------------
Avinash Chopde                         home :   508 470 1190
contex!avinash at uunet.uu.net            office : 617 224 5582



More information about the Comp.sys.sgi mailing list