blob: 1293b36535290a340002797c6d703e0121383520 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
/* gcc -o hidecursor `pkg-config --cflags --libs x11 xfixes` */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <X11/Xlib.h>
#include <X11/extensions/Xfixes.h>
static Display* display;
static int stop;
static void sighandler(int sig) {
stop = 1;
}
int main (int argc, char** argv)
{
display = XOpenDisplay(NULL);
signal(SIGINT, sighandler);
XFixesHideCursor(display, DefaultRootWindow(display));
XFlush(display);
printf("waiting. Ctrl + C to continue\n");
while(!stop) { }
stop = 0;
XFixesShowCursor(display, DefaultRootWindow(display));
XFlush(display);
printf("waiting. Ctrl + C to continue\n");
while(!stop) { }
XCloseDisplay(display);
return Success;
}
|