Bringing a GtkWindow to the current desktop with libwnck

2009-07-03 Thread Jim George
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
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GTK+ 2.16.4 released

2009-07-03 Thread Gabriele Greco
On Thu, Jul 2, 2009 at 5:28 PM, Thomas Stover tho...@wsinnovations.comwrote:


 There is some official (like Tor Win32 bundles) or unofficial OSX framework
 released or we have to build from sources?

 Building an OSX universal binary framework compatible with 10.4+ is not
 exactly easy like configure/make :)




 I have some notes from August '08 when I built gtk for osx with the x11
 back end. Let me know if you are interested. Most of the steps should be
 about the same. It was sort of funny in the sense that I have still never
 even used osx in gui mode. A friend set me up a shell account on his osx box
 on our lan, and from there via ssh and no root access, I made it all the way
 to screen shots for a presentation. I was very


Compile an X11 version or also a quartz version in the standard way it's
quite easy, the problem is that u get a ton of libraries for only one
architecture and it's really tough to fit them inside your application
bundle.

What I need are updated frameworks built like the one on www.gtk-osx.org,
that are really outdated (2.14.3).

Yesterday I've lost half of my afternoon trying to make the jhbuild scripts
used to build universal frameworks to work without luck...

The info on http://live.gnome.org/GTK%2B/OSX are not enough, neither are
some other I found googling around...

Maybe most of the problems I have are related to the fact I'm trying to
compile on 10.4.

-- 
Bye,
 Gabry
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Bringing a GtkWindow to the current desktop with libwnck

2009-07-03 Thread Brian J. Tarricone

On 2009/07/02 23:27, Jim George wrote:


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?


Try this:

WnckScreen *wnck_screen = wnck_screen_get_default();
wnck_screen_force_update(wnck_screen);

... before your wnck_window_get() call.

-brian
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list