Re: Limiting gtk app to single instance,



On Mon, 2005-01-10 at 04:13 +0000, Phillip Phirrip wrote:
>   
> Hello All,
> 
> Is there a way to limit the number of instances of a gtk application
> to one only. If an instance of this application is already running
> then can I bring it to focus. 
> I tried to read from the process table and find if the application is
> running, this works but the app has to wait till zombies are cleared.
> I was exploring if there is an API that would tell me if an instance
> of app is already running.
> 
> Thanks 
> Phillip,

The proper mechanism for this in X are "manager selections", about which
you can read in the ICCCM:
http://tronche.com/gui/x/icccm/sec-2.html#s-2.8

There is no convenient GTK+ api for these, though.

Matthias




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