Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!tut.cis.ohio-state.edu!ucunix.san.uc.edu!link From: link@ucunix.san.uc.edu (Virginia Link) Newsgroups: comp.sys.amiga.programmer Subject: front/back gadget and WindowToFront Message-ID: <1991Jun16.164922.15206@ucunix.san.uc.edu> Date: 16 Jun 91 16:49:22 GMT Sender: link@ucunix.san.uc.edu (Virginia Link) Distribution: usa Organization: Univ. of Cincinnati Lines: 27 To: Peter Cherna At this time our program puts a clock window up every second if it is not in front already. We do this with WindowToFront(). I think what is happening is when we make that call, all windows on the screen are considered not to be in front. So when I click on the front/back gadget of a window that appears graphically in front, it does not get pushed to the back. If I click a second time, it will still stay in the front since our clock program has put itself back in front again. If I click twice quickly on the window, it goes to the back, since our clock did not get a chance to be put to the front yet. Is there a way to prevent this from happening. Is there a varibale that stores the front window for each screen that I can change back to the window value after I call window to front for the clock window. For example, if window x is in front, could I store window x, call windowtofront for my clock window, say window c, then replace the variable that is keeping track of the front window back with x from c ? By the way, why is calling UpFrontLayer not legal on this screen ? vl