Re: wnck_screen_get_windows() returns empty window list
- From: Ben Liblit <liblit cs wisc edu>
- To: metacity-devel-list gnome org
- Subject: Re: wnck_screen_get_windows() returns empty window list
- Date: Mon, 26 Jun 2006 14:22:13 -0500
Thanks, Elijah and Havoc!
I'll document the corrected version of the Python code here for the
benefit of anyone Googling around for this in the future:
---------------------------------------------------------------
import wnck
screen = wnck.screen_get_default()
screen.force_update()
windows = screen.get_windows()
print 'window list:', windows
==>
window list: [<wnck.Window object (WnckWindow at 0xb7ba5644, ...]
---------------------------------------------------------------
I agree with Havoc's point about X apps being mostly asynchronous. In
this particular case, though, I really am writing a non-interactive
"fire once then exit" sort of script, so wnck_screen_force_update() was
exactly what I needed. Thank you!
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]