GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to get all window id locating in the taskbar ?

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
sunrain988
Familiar Face


Joined: 17 Jul 2008
Posts: 13

PostPosted: Thu Sep 04, 2008 6:28 am    Post subject: How to get all window id locating in the taskbar ? Reply with quote


How to get all window id locating in the taskbar ?
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <glib.h>

int main( int argc,
char *argv[] )
{
GtkWidget *window;

GList *dlist = NULL;
GList *listrunner;
gint xwin;

gtk_init (&argc, &argv);

window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Hello");
gtk_widget_show (window);

xwin = GDK_WINDOW_XWINDOW(GTK_WIDGET(window)->window);
g_print("ID = %d\n",xwin);

dlist = g_list_append(dlist,(gpointer)&xwin);
listrunner = g_list_first(dlist);
while(listrunner!=NULL)
{
g_print("windowID=%d\n",*(gint*)listrunner->data);
listrunner = g_list_next(listrunner);
}
g_list_free(dlist);
gtk_main ();
return 0;
}

gtk_window_list_toplevel() also just get the windows in your programme,
but,how can I get other windows in taskbar???
Look forward to getting help.
Back to top
dreblen
Never Seen the Sunlight


Joined: 14 Jun 2007
Posts: 526
Location: Falun, WI USA

PostPosted: Thu Sep 04, 2008 2:01 pm    Post subject: Reply with quote

I think that you'd need to do that at the X level or at the GNOME/KDE etc. level,
I believe that it's beyond the scope of an application.
Back to top
sunrain988
Familiar Face


Joined: 17 Jul 2008
Posts: 13

PostPosted: Fri Sep 05, 2008 5:59 am    Post subject: Thank you.I will try to do it. Reply with quote

dreblen wrote:
I think that you'd need to do that at the X level or at the GNOME/KDE etc. level,
I believe that it's beyond the scope of an application.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP