Results 1 to 3 of 3
hi,I have a program with kde ,why windows' name is null with "XFetchName"
follow code:
Code:
#include <X11/Xlib.h>
#include <stdio.h>
static char *window_id_format = "0x%lx";
int main (void)
{
unsigned ...
- 08-17-2010 #1Just Joined!
- Join Date
- Aug 2010
- Posts
- 2
kde. about window name----help
hi,I have a program with kde ,why windows' name is null with "XFetchName"
follow code:
thanks very much~~Code:#include <X11/Xlib.h> #include <stdio.h> static char *window_id_format = "0x%lx"; int main (void) { unsigned int numkids, i, mapped, scrn; Window r, p, *kids; XWindowAttributes attr; Window root; Display *dipsy; char *win_name; dipsy = XOpenDisplay(0); scrn = DefaultScreen (dipsy); root = RootWindow (dipsy, scrn); mapped = 0; XQueryTree (dipsy, root, &r, &p, &kids, &numkids); for (i = 0; i < numkids; ++i) { XGetWindowAttributes (dipsy, kids[i], &attr); if (attr.map_state == IsViewable) { ++mapped; printf (window_id_format, kids[i]); if (!XFetchName (dipsy, kids[i], &win_name)) { printf ("(has no name %d \n)",mapped); XFree (win_name); } else if (win_name) { printf (" %s \n", win_name); XFree (win_name); } } } }
- 08-17-2010 #2Just Joined!
- Join Date
- Aug 2010
- Posts
- 2
x-window,XFetchName get null
I use XFetchName get window name ,I get null(has no name),but I can see title in the window,etc ,firefox named "xfetchname - Google serch - Mozilla Firefox",but i got null
why?
thanks very much
- 08-22-2010 #3Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,957
Please provide the code you are using.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
