DMXGetScreenAttributes hangs with pthreads
Roman Bednarek
roman at mikronika.com.pl
Wed Feb 20 03:51:05 PST 2008
Hello
Quering about DMX screens with DMXGetScreenAttributes hangs when called
for a second screen, after XInitThreads was called and when program is
linked with pthreads. I have attached a small program to show the problem.
It hangs while getting second screen information. I have tested it on few
different systems and it always hanged.
Roman Bednarek
gcc t.c -o t -L/usr/X11R6/lib -lX11 -ldmx -lXtst -lpthread
int main()
{
Display* dpy;
DMXScreenAttributes attr;
int screen_count;
int index;
XInitThreads();
dpy=XOpenDisplay(NULL);
if(DMXGetScreenCount(dpy, &screen_count))
{
printf("screen_count:%d\n",screen_count);
for(index=0;index<screen_count;++index)
{
if(DMXGetScreenAttributes(dpy, index, &attr))
printf("displayName:%s\n",attr.displayName);
}
}
XCloseDisplay(dpy);
return 0;
}
More information about the xorg
mailing list