TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Paul Rider
from: hugo landsman
date: 1995-05-24 13:18:02
subject: BackGround windows...

hi Paul,

 hl>> If you follow the order of the windows, starting with 
 hl>> the screen background and ending with the window which 
 hl>> has the context, you don't have to recalculate each 
 hl>> windows visibilty.  Use a buffer for the entire screen 
 hl>> and show the end result when you're done moving the 
 hl>> windows into it: what should be invisible, will've been overwritten.

 PR> Yes, but if you have say 5 windows open and are doing frequent updates
 PR> to underlying windows, It seems to me that it'd be pretty wastefull
 PR> to re-draw every single window... There must be a better (albiet more
 PR> complicated) way.

It's only moving some bytes in memory until it gets time to show the
screen.  The latter you could offload to another thread (to be unblocked by
a muxwait event on input or time out and so).  But then this quickly
becomes complicated too:-)

Otherwise you'll have to reinvent something like PM: each window gets a
message when it must recalculate it's visible portion because a change in
the window ordering (or you do it for them in one sweep: starting with the
top window, each window gets to reserve a portion of the screen if it's
still free).  The rest of the time, a window has only to update it's
content and ask the screen to redraw the windows precalculated visible
portion (if it has one) if that was affected (compare the screens data
before copying the windows data over it).

regards,
         hugo
* Origin: (2:283/608.5)
SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809
@PATH: 283/608 6 1 512 396/1 270/101 105/103 42 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.