Re: How to get the titles for all top level windows



On Tue, 22 May 2007 16:33:49 -0700 Sreeram Akella wrote:

I need to develop an application that lists all top level windows along
with the corresponding titles. I tried using the method
gdk_windows_get_toplevels() to return the GList of all top level
windows on the default screen on the default display. When I check the
count of the list returned, I always get 1 irrespective of the number
of GUI applications I am running. 

gdk_windows_get_toplevels() will only return the windows that gdk knows
about: that is, the windows created by your application, or X windows
wrapped by gdk (by the application) using gdk_window_foreign_new().

To actually get all the toplevel windows, you could either use raw
Xlib, or there's probably something in libwnck that could help you.

        -brian




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]