From 00aa8cd38b3251ddd50fd46bf2edcbae604689d7 Mon Sep 17 00:00:00 2001 From: hanez Date: Mon, 13 Jan 2025 06:50:11 +0100 Subject: [PATCH] Just cosmetics... ;) --- Xtimer.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Xtimer.c b/Xtimer.c index e421eb2..6d23229 100644 --- a/Xtimer.c +++ b/Xtimer.c @@ -1,6 +1,6 @@ /** - * xtimer is a program that executes a givin program after a given time if no - * X11 keybord or mouse input happend in the given time. + * Xtimer is a program that executes a givin command or program after a given + * time if no X11 keybord or mouse input happend in the given time. * * Author: Johannes Findeisen - 2025 * License: Apache-2.0 (see LICENSE) @@ -8,11 +8,11 @@ #include #include +#include +#include // For INT_MAX and INT_MIN #include #include #include -#include -#include // For INT_MAX and INT_MIN int main(int argc, char *argv[]) { @@ -65,7 +65,7 @@ INT_MAX); XISetMask(mask, XI_KeyRelease); XISetMask(mask, XI_ButtonPress); XISetMask(mask, XI_ButtonRelease); - XISetMask(mask, XI_Motion); // Listen for mouse motion events + XISetMask(mask, XI_Motion); // Listen for mouse motion events if (XISelectEvents(display, root, &evmask, 1) != Success) { fprintf(stderr, "Error: Unable to select input events.\n"); @@ -91,7 +91,7 @@ INT_MAX); XNextEvent(display, &event); if (event.xcookie.type == GenericEvent && - event.xcookie.extension == opcode && // Use the opcode obtained earlier + event.xcookie.extension == opcode && // Use the opcode obtained earlier XGetEventData(display, &event.xcookie)) { XIDeviceEvent *xi_event = (XIDeviceEvent *)event.xcookie.data; if (xi_event->evtype == XI_KeyPress || @@ -105,7 +105,7 @@ INT_MAX); } // Sleep briefly to reduce CPU usage - usleep(10000); // 10 milliseconds + usleep(10000); // 10 milliseconds } // Close the X display