Anyone used Xlib much? I just want to ring the speaker/bell/beeeeep with it.
Complile -lX11.Code:#include <stdio.h> #include <X11/Xlib.h> int main(void) { Display *display = NULL; perror("Now"); if ((display = XOpenDisplay(":0.0")) == NULL) { perror("Can't connect to server"); } printf("%p\n",display); perror("Now"); XBell(display,100); perror("Now"); return 0; }
What's weird to my mind here is this output:
Now: Success
0xf3a010
Now: Resource temporarily unavailable
Now: Resource temporarily unavailable
Apparently errno is getting set before the XBell call, but XOpenDisplay returned a valid pointer...



LinkBack URL
About LinkBacks



