Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!snorkelwacker!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) Newsgroups: comp.windows.x Subject: Re: ICCCM and colormaps---simple question Message-ID: <9002151215.AA02926@Larry.McRCIM.McGill.EDU> Date: 15 Feb 90 12:15:28 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 34 >>> ...is there a way for the application to automatically detect that? [that there is or isn't a window manager running] >> Twm detects another window manager when calling XSelectInput on the >> root window. If this call fails, it assumes that another wm is >> there. (Only one client is allowed to select button press events on >> a window). > Almost. It's actually the SubstructureRedirectMask that only one > client is allowed to do. Mostly true but nonetheless somewhat misleading. From the Xlib doc file in the R4 distribution: Multiple clients can select input on the same window. ... However, only one client at a time can select for SubstructureRedirectMask, ResizeRedirectMask, and ButtonPressMask. If a client attempts to select any of these event masks and some other client has already selected one, a BadAccess error results. So yes, substructure redirection can be selected for by only one client at a time, as you say. But, contrary to your implication, the same is true of button press events. As a side note, the last sentence I quoted from the doc file makes it sound as though selecting for any one of the three masks mentioned will prevent anyone else from selecting any of the three, even the other two. Is this really the way it works? Is this really the way it's supposed to work? If so, why? der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu