 |
GTK+ Forums Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
|
|
|
| Author |
Message |
|
|
sunrain988 Familiar Face
Joined: 17 Jul 2008 Posts: 13
|
Posted: Thu Sep 04, 2008 6:28 am Post subject: How to get all window id locating in the taskbar ? |
|
|
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: 643 Location: Falun, WI USA
|
Posted: Thu Sep 04, 2008 2:01 pm Post subject: |
|
|
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
|
Posted: Fri Sep 05, 2008 5:59 am Post subject: Thank you.I will try to do it. |
|
|
| 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 |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group CodeBB 1.0 Beta 2
|