#!/usr/bin/env python # # Written by nigeltao@gnome.org. # Released into the public domain on January 2007. # # Clicking the GUI button will print geometry and title information for all # windows on all workspaces. import gtk, wnck def on_clicked(widget): for w in screen.get_windows(): print w.get_geometry(), w.get_name() def on_destroy(widget): gtk.main_quit() screen = wnck.screen_get_default() button = gtk.Button("Print All Windows") button.connect("clicked", on_clicked) window = gtk.Window(gtk.WINDOW_TOPLEVEL) window.connect("destroy", on_destroy) window.set_title("Wnck!") window.add(button) window.show_all() gtk.main()