Hello,
This question is about the Wnck library. I still hope someone here can shed light on this issue.

The following code snippet loops though all active workspaces/desktops.
It then tries to report the actual desktop/workspace number, but the "current workspace num" does not change.

The code is here: http://www.futuredesktop.com/tmp/desktop_test.py

Look at the last three lines.
      ws  = screen.get_active_workspace()
      ws_num = ws.get_number()
      print "i=", i, "   current workspace num=", ws_num

I reports something like this:
  i= 0    current workspace num= 1
  i= 1    current workspace num= 0
  i= 2    current workspace num= 0
  i= 3    current workspace num= 0
  i= 4    current workspace num= 0

The "current workspace num" is totally wrong.
Why does Wnck behave like this?

BTW: I run this code on 64bit Ubuntu 9.10 with GNOME + Metacity Window Manager (not Compiz WM).
$ metacity --replace

References: http://library.gnome.org/devel/libwnck/stable/
http://library.gnome.org/devel/libwnck/stable/WnckScreen.html#wnck-screen-get-active-workspace

I may start to use the "wmctrl" command directly.
It rocks but I would rather not be dependent on external tools, subprocess'ing that from my Python modules.

Cheers,
  Osmo (Moma) Antero
  Grønland







_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to