[pygtk] WNCK question

Gustavo J. A. M. Carneiro gjc at inescporto.pt
Thu Apr 20 18:01:55 WST 2006


On Qua, 2006-04-19 at 20:56 +0200, Danny Milosavljevic wrote:
> Hi,
> 
> Am Dienstag, den 18.04.2006, 23:13 +0100 schrieb Magnus Therning:
> > 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
> 
> We, the Xfce Project, have an old fork of wnck (called netk now), and
> there it didn't update the window list until some idle callback of it
> had been called by the main loop (i.e. the main loop was already
> running!)
> 
> I patched that by now, but I guess the original wnck still has the
> problem :)

  You patched wnck the C library or the python bindings?

> 
> cheers,
>   Danny
> 
> 
> _______________________________________________
> pygtk mailing list   pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
-- 
Gustavo J. A. M. Carneiro
<gjc at inescporto.pt> <gustavo at users.sourceforge.net>
The universe is always one step beyond logic.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2289 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20060420/b68567a3/smime.bin


More information about the pygtk mailing list