Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!yale!zip.eecs.umich.edu!newshost.marcam.com!news.mathworks.com!news.ultranet.com!news.sprintlink.net!EU.net!Portugal.EU.net!news.rccn.net!scsing.switch.ch!news.belwue.de!news.belwue.de!news.informatik.uni-stuttgart.de!miller
From: miller@diapool.informatik.uni-stuttgart.de (Gerhard Miller)
Subject: Wrong origin after resize event on VW2/Unix
Message-ID: <MILLER.95Jun7113908@diapool.informatik.uni-stuttgart.de>
Followup-To: comp.lang.smalltalk
Lines: 67
Sender: news@informatik.uni-stuttgart.de
Organization: Informatik, University of Stuttgart, Germany
Date: Wed, 7 Jun 1995 09:39:08 GMT

Under Visual Works 2 I'd like to hook into the resize event of an 
application window.

However, on my Unix machine, when the resize event has been processed,
the origin of the application window is *always* 0@21 (see also the
comment in class ApplicationWindow) until the mouse cursor reenters
the window (every mouse move changes the window origin to the correct
value - hmmm, strange workaround).

To examine the problem file in the following:

-[ST sample class]----------------------------------------------------

ApplicationWindow subclass: #TestWindow
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Window Testing'!


!TestWindow methodsFor: 'private'!

processEvent: anEvent 

	"TestWindow new open"

	anEvent key == #resize ifTrue: [
		Transcript print: self displayBox; cr; flush.
		"displays wrong origin which seems to be only
		corrected after reentering the window with 
		the mouse cursor. But at this point I really
		would like to know the correct origin ..." ].
	super processEvent: anEvent.! !

-[EOC]---------------------------------------------------------------

Then, on your Unix machine, evaluate

	(TW := TestWindow new) open

(declare TW as global) and perform a resize through your window manager. 
Do not reenter the window. Inspecting

	TW displayBox

yields still the same, wrong origin.


I need to know the correct origin at the time the resize event
occurs. Anybody knows how to accomplish this?

If you repost, please respond also via email. Thanks.

Gerhard
email: miller@dia.informatik.uni-stuttgart.de




--

---------------------------------------------------------------------
Gerhard Miller, Schorndorfer Str. 24, 70734 Fellbach, Germany
miller@dia.informatik.uni-stuttgart.de  Phone/Fax: +49-711-584747
---------------------------------------------------------------------


