Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!ames!sgi!shinobu!odin!lroy From: lroy@sgi.com (Linda Roy) Newsgroups: comp.sys.sgi Subject: Re: Changing windows Message-ID: <1990Nov19.193044.16280@odin.corp.sgi.com> Date: 19 Nov 90 19:30:44 GMT References: <1990Nov16.031651.21667@agate.berkeley.edu> <1990Nov19.004756.5869@odin.corp.sgi.com> Sender: news@odin.corp.sgi.com (Net News) Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 30 >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)? > Look at 2.7.3 The Event Queue and 2.7.4 Window Manager Devices in the SGI 4Sight Programmer's Guide. To select between multiple windows using the mouse location, queue INPUTCHANGE which will be entered on the queue each time the mouse move into a different window. The value listed with the INPUTCHANGE is the graphics window id. The events REDRAW and DEPTHCHANGE also return the graphics window id and are needed to control redaw events and push/pops of a window. in your initialization: qdevice( INPUTCHANGE ); /* may be done automatically */ in your mouse event loop: dev = qread(&value); if (dev == INPUTCHANGE ) /* value returned is the current graphics window id */ Linda