Changing windows

Gavin Bell gavin at krypton.asd.sgi.com
Mon Nov 19 11:47:56 AEST 1990


>Suppose, I wanted
>to allow the user to select the new graphics window with the mouse.  Is
>there a function which returns the id of the window the mouse is currently
>contained by (ACK! I've ended a sentence with a preposition)?

Sure (kind of); get the positions of the windows you're controlling
using getorigin() and getsize(); then figure out which of these
windows the mouse click was inside (easy, of course, until the GL
allows arbitrarily shaped windows).  If it is contained inside more
than one window, use the windepth() function to figure out which
window is on top.

Standard disclaimer number 2:
	I've never actually coded this, but have every reason to believe
	that it will work.  I have no idea if and/or when the GL will
	support arbitrarily shaped windows, and am not an Official
	Spokesperson (TM) for Silicon Graphics.
--
--gavin     (gavin at sgi.com,  (415)335-1024)



More information about the Comp.sys.sgi mailing list