[pygtk] WNCK question

Magnus Therning magnus at therning.org
Wed Apr 19 06:13:45 WST 2006


After discovering wmctrl and EWMH I decided to play around a little with
wnck. Of course I'd like to do it in Python. However I'm having some
problems to get started. I entered the following in ipython running in
a gnome-terminal:

 In [1]: import wnck

 In [2]: scr = wnck.screen_get_default()

 In [3]: scr
 Out[3]: <wnck.Screen object (WnckScreen) at 0xa7b08e3c>

 In [4]: scr.get_windows()
 Out[4]: []

 In [5]: scr.get_active_window()

 In [6]: scr.get_windows_stacked()
 Out[6]: []

 In [7]: scr.get_workspace_count()
 Out[7]: 0

The results are a little surprising to me. I was expecting to find some
windows on the current screen, and I have 8 workspaces. Am I missing
something here?

I have only managed to find the reference docs for libwnck. The only
program I know uses it is devilspie, but it's not exactly ideal for
jumpstarting my plying with wnck...

/M

-- 
Magnus Therning                    (OpenPGP: 0xAB4DFBA4)
magnus at therning.org
http://therning.org/magnus

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

As we enjoy great advantages from the inventions of others we should
be glad of an opportunity to serve others by any invention of
ours, and this we should do freely and generously.
     -- Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20060418/83a57988/attachment.pgp


More information about the pygtk mailing list