[pygtk] how do I get a list of windows on my desktop?

Giuseppe Penone giuspen at gmail.com
Thu Mar 15 16:50:24 WST 2012


you can take a look to the source code of http://www.giuspen.com/x-tile/


On Thu, Mar 15, 2012 at 09:27, John Accoun <jsonacc at gmail.com> wrote:

> None of these work:
>
> ============================
> >>> gtk.gdk.window_get_toplevels()
> [<gtk.gdk.Window object at 0xb74339b4 (GdkWindow at 0x8a4c170)>]
>
> >>> gtk.gdk.window_get_toplevels()[0].get_children()
> []
> ============================
>
>
> ============================
> >>> d = gtk.gdk.DisplayManager()
> >>> d.get_default_display().get_screen(0).get_root_window().get_children()
> [<gtk.gdk.Window object at 0x89dcc84 (GdkWindow at 0x8a4c170)>,
> <gtk.gdk.Window object at 0x89dccac (GdkWindow at 0x8a4c0c0)>]
> ============================
>
> The second method returns two windows with no children, regardless the
> amount of windows I have on my desktop. Could anyone point me the
> right direction and explain why none of the above does what I want?
> _______________________________________________
> pygtk mailing list   pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.daa.com.au/pipermail/pygtk/attachments/20120315/278556f1/attachment.html>


More information about the pygtk mailing list