Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!amdahl!dlb!ardent!rap From: rap@ardent.UUCP (Rob Peck) Newsgroups: comp.sys.amiga.tech Subject: Re: IDCMP ports Message-ID: <353@ardent.UUCP> Date: 22 Apr 88 18:19:39 GMT References: <2336@mit-amt.MEDIA.MIT.EDU> Distribution: na Organization: Dana Computer, Inc., Sunnyvale, CA Lines: 36 Keywords: screens windows Summary: IDCMP is part of a window... In article <2336@mit-amt.MEDIA.MIT.EDU>, dlleigh@mit-amt.MEDIA.MIT.EDU (Darren L. Leigh) writes: > If I have an application that has created a custom screen and I don't > want to open any windows, how do I get an IDCMP port between me and > Intuition? > information without cluttering up the world with windows. > > Is this possible? If not, is this why I see gratuitous tiny windows > behind so many applications? Someone suggested the tiny-window 1x1 pixel as ushow uses, but that won't do what you wish. Problem is: if you click in the custom screen, the tinywindow is no longer the active one, and its IDCMP won't see much if any input. Appropriate solution is to open ONE window, covering the entire custom screen (except perhaps the screen title bar area perhaps). Make it BACKDROP and BORDERLESS and it won't take much chip memory because you will be drawing directly into the SCREEN's bitmap. The IDCMP associated with this window gives you the event stream you want. No matter where you click in the screen with the mouse, this backdrop window then remains the active one and continues to feed events to the IDCMP. Because it is BACKDROP/BORDERLESS, your user won't see it and you avoid the "clutter". The so-called gratuitous tiny windows you see are often a result of the startup code for workbench-launched applications. They sometimes need a place to direct their standard output or standard error -- in the absense of this tiny-window, an output (for whatever reason) perhaps a printf("cannot find serial.device") would crash the system if there was no place to send the message. Of course if a program treats a workbench startup properly, the program can be linked with some version of a startup that does not need to open the tiny window. Code similar to: if( started_from_CLI ) SendErrorToCLI(error); else UseAnAutoRequestor(error); Rob Peck ...ihnp4!hplabs!ardent!rap