Originally Posted by
Yonut
Hi,
I want to recreate a feature I have seen before, but I can't find any reference of how to implement it.
I have a dropbox application (custom, encrypted, ftp-like client), and I want to make sure that only one instance can be run at a time. I have a lock file which makes sure of this.
But what I'd like is if a second instance is run, and finds the first instance still running, that it gives focus to the first instance and then the second instance exits.
I think it might be handled by the window manager rather than the program itself, but to me it's worth asking about. Can someone please shed some light by point me in the right direction?
Ty.
EDIT*:
Maybe the communication can be done using shared memory? But this still doesn't help with the focus of a non-child window.