Re: Application launch detection

> Hi,
> We were recently discussing how to provide a progress indicator while
> an app is launching in future versions of GNOME. 

Good. It's about time we work out an good, working solution.

> The author of Xalf points out that the PID method breaks down in
> several cases; for example, when an app is run from a wrapper script. 
> So Xalf improves on this by having the launching app set an env
> variable which the launch app advertises on mapped windows.

Actually, the current version doesn't advertise atoms on the mapped
windows. Instead it signals the "tracking process" with a simple
kill(pid, SIGUSR1). If we wan't a more centralized approach, the kill can
be replaced by an XSendEvent, which sends an signal to the root window. An
central "feedback server" can listen for these types of events. 

This is just ideas, and still relies on a specialized XMapWindow(). I have
some example code though, if someone is interested. 

> Several proposals:
>  1) We should specify a property on app windows that is set to the
>     value of the environment variable DESKTOP_LAUNCH_ID. If
>     DESKTOP_LAUNCH_ID is not set, then the property is not set
>     either. The value of DESKTOP_LAUNCH_ID can be any string, it's
>     totally interpreted by the launching application, but should
>     contain some kind of namespacing and some kind of globally
>     random/unique value. The property could be called _NET_LAUNCH_ID I
>     suppose.
>     Apps should put the LAUNCH_ID on all their windows throughout the 
>     lifetime of the application.

This must be done by the toolkit. Even if both GTK and QT supports this,
there is still lots of applications not supporting this. Maybe we have to
live with that, but it would be great if we could do better than this. 

/Peter Astrand <astrand lysator liu se>

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