How to get the titles for all top level windows



Hi,

 

I am using GTK version 2.8.9 on Fedora Core 6.

 

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. 

 

My code snippet:

 

.....

            GList * pList = gdk_windows_get_toplevels();

            g_print("Number of Top Level Windows: %d\n",
g_list_length(pList));

 

....

 

The count is always printed as 1. 

 

I would greatly appreciate it if some one can point me to the error here
or still better a code snippet that can do this.

 

Thanks

Sreeram

 

 




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