[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Bringing a GtkWindow to the current desktop with libwnck
- From: Vivien Malerba <vmalerba gmail com>
- To: Jim George <jimgeorge gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Bringing a GtkWindow to the current desktop with libwnck
- Date: Sun, 5 Jul 2009 11:51:19 +0200
2009/7/3 Jim George <jimgeorge gmail com>
> Hi all,
> I'm writing a program that needs to be "single-instance". The program
> will only run on gnome desktop machines. I'm using dbus to ensure
> this, by having the program try a dbus rpc each time it starts. If
> there's a running instance, it responds to the rpc by calling
> gtk_window_present on the main window. However, if the user switches
> desktops and tries to run another instance, gtk_window_present will
> only cause the window to appear on the previous desktop, not the
> current one.
>
> I tried to get around this using libwnck. I call
> wnck_window_get(GDK_WINDOW_XID(main_window->window)), but the
> WnckWindow returned is always NULL. The X window ID "seems" to make
> sense (it's a large integer), so what am I doing wrong?
>
You could use Libunique http://live.gnome.org/LibUnique for that purpose.
Vivien
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]