home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / amiga / programm / 17956 < prev    next >
Encoding:
Internet Message Format  |  1992-12-30  |  2.3 KB

  1. Path: sparky!uunet!mcsun!news.funet.fi!funic!sauna.cs.hut.fi!news.cs.hut.fi!s37732v
  2. From: s37732v@snakemail.hut.fi (Markus Juhani Aalto)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: WindowToBack() ... BUG?!?!?!
  5. Date: 30 Dec 92 15:51:13 GMT
  6. Organization: Helsinki University of Technology, Finland
  7. Lines: 51
  8. Distribution: world
  9. Message-ID: <S37732V.92Dec30175113@lk-hp-17.hut.fi>
  10. References: <1hrvlkINN2lg@cc.tut.fi>
  11. NNTP-Posting-Host: lk-hp-17.hut.fi
  12. In-reply-to: k114636@cc.tut.fi's message of 30 Dec 1992 13:03:15 +0200
  13.  
  14. In article <1hrvlkINN2lg@cc.tut.fi> k114636@cc.tut.fi (Kuulusa Mika) writes:
  15.  
  16.  
  17.    I'll discribe a bit...
  18.  
  19.    I have a program running on the background which does
  20.    WindowToBack() every 4 seconds. Then I start dragging an
  21.    icon (in Workbench) and when the program does WindowToBack(),
  22.    the icon VANISHES. Just like that. Hm.... why?
  23.  
  24. I had the same problem and it has to do something with layer lockings.
  25. Someone form Commodore explained this to me once, but I can't recall
  26. what the exact reson was.
  27.  
  28.    How should I make the window go background? With layers.library
  29.    I can make the windowlayer go background, but I don't know how
  30.    to refresh other layers in the screen. Can someone help me?
  31.  
  32. You have to try to lock layers before use WindowToBack().
  33. Check the code in the end.
  34.  
  35.        Mika Kuulusa                                  p.931-236 304
  36.        Yliopistonkatu 46B49,33100 TAMPERE      email k114636@cc.tut.fi
  37.        FINLAND                "Ei saa j{{d{ tuleen makaamaan"
  38.  
  39. ----------- clip here --------------------
  40.  
  41. /*     Lock layers. If someone else has locked it, then we wait. */
  42. LockLayerRom( WorkbenchScreen->LayerInfo.top_layer );
  43. Forbid();
  44. UnlockLayerRom( WorkbenchScreen->LayerInfo.top_layer );
  45.  
  46. WindowToFront(MyWindow);    /* Or use WindowToBack() */
  47. Permit();
  48.  
  49. ----------- clip here -----------------------
  50.  
  51. This ought to do it.
  52.  
  53.  
  54. --
  55.  
  56.  
  57. **************************************************************************
  58. *         Markus Aalto              | Helsinki University of Technology  *
  59. *                                   |                                    *
  60. *  EMail: s37732v@vipunen.hut.fi    | Faculty of Electric Engineering    *
  61. *  Fax:   358-0-8746991 (Sometimes) |                                    *
  62. *                                   | Undergraduate in Computer Science  *
  63. **************************************************************************
  64.         
  65.