Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: ssc-vax!dmg@beaver.cs.washington.edu (David Geary) Newsgroups: comp.sys.sun Subject: Opening a second window Keywords: Windows Message-ID: <2835@ssc-vax.UUCP> Date: 3 Aug 89 22:04:48 GMT Sender: root@rice.edu Organization: Boeing Aerospace Corp., Seattle WA Lines: 66 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 94, message 9 of 21 First, thanks to all who responded to my request concerning closing a window without confirming. Now I have a another question... I open a window (window #1) under SunView using window_create(), and then a subsequent call to window_main_loop(). If I detect certain events in the window, I want another window to open (window #2), and receive events in the new window. When a certain event occurs in window #2, I close the window, and want to start getting events in window #1 once again. Here's what I want to do: create_window() creates window #1 window_main_loop() for window #1 later on... create_window() creates window #2 window_main_loop() for window #2 later on... window_done() for window #2 At this point, I want to start getting events for window #1 again. When I try this, I run into problems: 1. When I call window_main_loop() for window #2, I get: Notifier error: Invalid argument 2. When I quit out of window #2, I get a stream of: . . . WIN ioctl number 2000671E: Bad file number WIN ioctl number C00C671D: Bad file number WIN ioctl number C014671F: Bad file number WIN ioctl number C0146720: Bad file number WIN ioctl number 2000671E: Bad file number . . . 3. After quitting out of window #2, window #1 is dead in the water. It gets no events. I must be hosing the notifier by calling window_main_loop() a second time before the first call to window_main_loop() returns. I realize that I could use a SunView popup to do what I want, but, for reasons I won't go into, I need it to be just a regular old window. BTW I have RTFM, but I've gotten nowhere ;-( Any suggestions? -- David Geary, Boeing Aerospace, Seattle "I wish I lived where it *only* rains 364 days a year"