On Thu, Mar 15, 2012 at 17:30, John Accoun <json...@gmail.com> wrote:
> 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?

Those are windows within your process. To know which other X clients
are running and their top level windows, you can use wnck.

Regards,

Tomeu

> On Thu, Mar 15, 2012 at 9:50 AM, Giuseppe Penone <gius...@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 <json...@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@daa.com.au
>>> http://www.daa.com.au/mailman/listinfo/pygtk
>>> Read the PyGTK FAQ: http://faq.pygtk.org/
>>
>>
> _______________________________________________
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to