[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Application launch detection

I've written an new fifo-based demo-code. Fetch it from

Right now, it looks like a good solution to me. Read on...

On 11 Nov 2000, Owen Taylor wrote:

> > > I think hacking this into XMapWindow is simply wrong:
> And note that extending your code to do anything more than
> the simply "send an event to the root window" would break
> things badly - if you generate a round trip to the X server,

With this fifo-approach, there is no interference with X at all: No extra
events are sent, no extra properties are created and no extra roundtrips
are added. I simply take the environment variable and write it to an fifo. 

An monitor reads this fifo and can tell when apps has started. 

> But you have also severly constrained what applications and 
> toolkits can do, because if, using the extra information
> available to them, they want to do a better implemenation
> of LAUNCH_ID, then they have to know to unset LAUNCH_ID
> before they first call XMapWindow(). That's not a clean
> and maintainable API...

True, but even an Toolkit-based solution will suffer from this. Or? I
think that if an application takes a long time to load, it should use an
splash-screen anyway. Like gimp. 

Note: The fifomon.tgz demo uses LD_PRELOAD, but this is just a convenient
way of testing things. I still think that Xlib should be patched
directly. It's only a few lines of code. 


/Peter Astrand <astrand lysator liu se>

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]