🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #25351

Handling ExposeWindow events for nested windows

#25351
From: mlp
Date: Wed, 08 Apr 1987 17:06
26 lines
1840 bytes

I am implementing a program which makes use of nested windows.  When the
outermost window is resized (by the user) the application is responsible
for resizing the subwindows of the main window.  Unfortunately each subwindow
receives an ExposeWindow event before its parents and when I resize the windows
they get a further series of ExposeWindow events. 

I am trying to implement my program in an enhanced version of the Xr toolkit
(from HP).  In this version each window can have a callback function which is
called whenever a new event arrives for that window.  This localizes the
handling of events for each window and makes it easier to process events and
to add new windows.

The problem is that if I simply handle ExposeWindow events by redrawing the
window I redraw each subwindow twice for each main window resize.  Once before
the main window is notified of the resize and once after the sub window has beenredrawn.  I also appear to be getting some ExposeWindow events when a window
covering my subwindows is iconified.

Does anyone know of a generic way of handling ExposeWindow events that will
reduce the number of redraws to the minimum necessary to keep the screen
upto date?  Assuming that I have also enabled ExposeRegion events under what 
circumstances will I get ExposeWindow events.

Mark Patrick
hplabs!dana!mlp
Technical Details
Message-ID: <141@dana.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!necntc!auspyr!dlb!dana!mlp

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!necntc!auspyr!dlb!dana!mlp
From: mlp@dana.UUCP
Newsgroups: comp.windows.x
Subject: Handling ExposeWindow events for nested windows
Message-ID: <141@dana.UUCP>
Date: Wed, 8-Apr-87 12:06:26 EST
Article-I.D.: dana.141
Posted: Wed Apr  8 12:06:26 1987
Date-Received: Sat, 11-Apr-87 08:19:59 EST
Organization: Dana Computer, Inc., Sunnyvale, CA
Lines: 26