Bringing a GtkWindow to the current desktop with libwnck
- From: Jim George <jimgeorge gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Bringing a GtkWindow to the current desktop with libwnck
- Date: Fri, 3 Jul 2009 00:27:15 -0600
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?
Any alternate solutions to this problem are also welcome.
Thanks,
Jim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]