🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #25362

Re: Handling ExposeWindow events for nested windows

#25362
From: haynes
Date: Fri, 10 Apr 1987 19:40
28 lines
1658 bytes
	> [...] ExposeWindow is sure useful,
	> but from a programmer's point of view a ResizeWindow event would have
	> been EXTREMELY helpful too. 

	It seems to me that if you do an XQueryWindow() after an ExposeWindow
	event, and compare the window size to the previous size, you effectively
	have the ResizeWindow event.


I guess this point hasn't been made strongly enough.

	SERVER ROUND TRIPS ARE VERY EXPENSIVE

Avoid them at all cost. Cache things in the client, keep local data
structures in your program, stand on your head, whatever. A server
round trip is almost always more expensive.

Doing a QueryWindow to simulate a ResizeEvent IS A LOSE. Keep your size
locally, and make sure you serialize your XEvents properly, and you can
KNOW your size all times. Then checking exposes for resizes is cheap
and easy. This is the technique we used in the X10 toolkit to simulate
resize. In X11 of course, resize is provided.

The X protocol is great, but you need to understand the reality of its
implementation to use it well.

	-- Charles
Technical Details
Message-ID: <8704101702.AA10127@vulcan.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!lll-lcc!ames!ucbcad!ucbvax!DECWRL.DEC.COM!haynes

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!lll-lcc!ames!ucbcad!ucbvax!DECWRL.DEC.COM!haynes
From: haynes@DECWRL.DEC.COM.UUCP
Newsgroups: comp.windows.x
Subject: Re: Handling ExposeWindow events for nested windows
Message-ID: <8704101702.AA10127@vulcan.dec.com>
Date: Fri, 10-Apr-87 14:40:57 EST
Article-I.D.: vulcan.8704101702.AA10127
Posted: Fri Apr 10 14:40:57 1987
Date-Received: Sat, 11-Apr-87 18:01:58 EST
Sender: daemon@ucbvax.BERKELEY.EDU
Distribution: world
Organization: The ARPA Internet
Lines: 28