Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!ames!sgi!shinobu!odin!krypton!gavin From: gavin@krypton.asd.sgi.com (Gavin Bell) Newsgroups: comp.sys.sgi Subject: Re: Changing windows Message-ID: <1990Nov19.004756.5869@odin.corp.sgi.com> Date: 19 Nov 90 00:47:56 GMT References: <1990Nov16.031651.21667@agate.berkeley.edu> Sender: news@odin.corp.sgi.com (Net News) Organization: Silicon Graphics, Inc. Mountain View, CA Lines: 19 >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@sgi.com, (415)335-1024)