desktop-packages team mailing list archive
-
desktop-packages team
-
Mailing list archive
-
Message #11730
[Bug 533694] Re: Wnck fails to report correct workspace number. Urgent!
[Expired for gnome-python-desktop (Ubuntu) because there has been no
activity for 60 days.]
** Changed in: gnome-python-desktop (Ubuntu)
Status: Incomplete => Expired
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gnome-python-desktop in Ubuntu.
https://bugs.launchpad.net/bugs/533694
Title:
Wnck fails to report correct workspace number. Urgent!
Status in “gnome-python-desktop” package in Ubuntu:
Expired
Bug description:
Hello,
Using "python-wnck" to report and set the workspace/desktop number.
I have the following Python code. It first sets the current
desktop/workspace (in the loop) and then tries to report the desktop
number.
The print "actual=", actual
statement prints always the first desktop (eg. 0), It does not change.
IT DOES NOT OBEY THE ws.activate(timestamp) command.
Note: you must test this with Metacity Window Manager. It will not work with Compiz. Run
$ metacity --replace
# The code:
import gtk, gobject, wnck
import time
class Cambiatore(object):
def __init__(self):
self.screen= wnck.screen_get_default()
def cambia(self, next_ws):
ws = self.screen.get_workspaces()[next_ws]
timestamp = int(time.time())
ws.activate(timestamp)
ws = self.screen.get_active_workspace()
actual = self.screen.get_workspace_index(ws)
print "actual=", actual
gtk.main_quit()
c = Cambiatore()
# Supposing you have at least 4 virtual desktops. Loop'em.
for i in range(4):
gobject.idle_add(c.cambia, i)
gtk.main()
And why does it need this evet-loop thing ?
DEEPLY COONFUUSING !
ProblemType: Bug
Architecture: amd64
Date: Sun Mar 7 09:39:07 2010
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release Candidate amd64 (20091020.3)
NonfreeKernelModules: nvidia
Package: python-wnck 2.28.0-0ubuntu1
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-20.57-generic
SourcePackage: gnome-python-desktop
Uname: Linux 2.6.31-20-generic x86_64
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-python-desktop/+bug/533694/+subscriptions