[pygtk] how do I get a list of windows on my desktop?
jsonacc at gmail.com
Fri Mar 16 00:30:04 WST 2012
Thank you Giuseppe, but I think I would still like some more guidance.
I had a bit of trouble following x-tile source, but from what I
understood, you get the window list by interacting with x11 C library
which you load using ctypes. did I got that right?
I would like to avoid going that path as it feels a bit hacky and I
don't have the knwledge on x11 it would take.
Could anybody explain why none of my snippets do what I want?
On Thu, Mar 15, 2012 at 9:50 AM, Giuseppe Penone <giuspen at gmail.com> wrote:
> 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().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
>> Read the PyGTK FAQ: http://faq.pygtk.org/
More information about the pygtk