aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorProsperousPotato <ProsperousPotato@users.noreply.github.com>2025-07-26 23:19:14 +0100
committerProsperousPotato <ProsperousPotato@users.noreply.github.com>2025-07-26 23:19:14 +0100
commita7019a39c3497488e6e1e7c5851a2c28831a9f2b (patch)
tree67f66f0d922618db1cd0ea990115358841188e3e
parent6d3abc654fa5fab27e932eb08df7627258a1e9f2 (diff)
hide cursor at startup
-rw-r--r--main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.c b/main.c
index b5a0ed0..fb00c98 100644
--- a/main.c
+++ b/main.c
@@ -5,7 +5,7 @@
static void xi_select_events(int);
static Display *d;
-static Window r; // root-window
+static Window r;
void xi_select_events(const int event) {
unsigned char mask[3] = {None};
@@ -23,7 +23,12 @@ int main(void) {
return 1;
}
r = XDefaultRootWindow(d);
+
xi_select_events(XI_RawKeyPress);
+ xi_select_events(XI_RawMotion);
+
+ XFixesHideCursor(d, r);
+
XEvent e;
XGenericEventCookie *c;
while (!XNextEvent(d, &e)) {