From 3213c680848f89ab052c4c50900aaf0011ed7222 Mon Sep 17 00:00:00 2001 From: Paul Hughes Date: Mon, 17 Mar 2025 15:31:16 +0000 Subject: [PATCH] fixed tab width in xeleven file --- src/xeleven.cpp | 66 ++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/src/xeleven.cpp b/src/xeleven.cpp index ae09252..e9cc7a3 100644 --- a/src/xeleven.cpp +++ b/src/xeleven.cpp @@ -9,48 +9,48 @@ // Function to display a message box void showMessageBox(Display *display, const char *title, const char *message) { - // Open a connection to the X server - int screen = DefaultScreen(display); + // Open a connection to the X server + int screen = DefaultScreen(display); - // Create a simple window - Window window = XCreateSimpleWindow( - display, RootWindow(display, screen), - 100, 100, 400, 200, 1, - BlackPixel(display, screen), WhitePixel(display, screen) - ); + // Create a simple window + Window window = XCreateSimpleWindow( + display, RootWindow(display, screen), + 100, 100, 400, 200, 1, + BlackPixel(display, screen), WhitePixel(display, screen) + ); - // Set the window title - XStoreName(display, window, title); + // Set the window title + XStoreName(display, window, title); - // Select events to handle - XSelectInput(display, window, ExposureMask | KeyPressMask); + // Select events to handle + XSelectInput(display, window, ExposureMask | KeyPressMask); - // Create a graphics context for drawing - GC gc = XCreateGC(display, window, 0, NULL); + // Create a graphics context for drawing + GC gc = XCreateGC(display, window, 0, NULL); - // Map the window (make it visible) - XMapWindow(display, window); + // Map the window (make it visible) + XMapWindow(display, window); - // Event loop - XEvent event; - while (1) { - XNextEvent(display, &event); + // Event loop + XEvent event; + while (1) { + XNextEvent(display, &event); - // Handle expose event (window needs to be redrawn) - if (event.type == Expose) { - // Draw the message in the window - XDrawString(display, window, gc, 50, 100, message, strlen(message)); - } + // Handle expose event (window needs to be redrawn) + if (event.type == Expose) { + // Draw the message in the window + XDrawString(display, window, gc, 50, 100, message, strlen(message)); + } - // Handle key press event (close the window) - if (event.type == KeyPress) { - break; - } - } + // Handle key press event (close the window) + if (event.type == KeyPress) { + break; + } + } - // Clean up - XFreeGC(display, gc); - XDestroyWindow(display, window); + // Clean up + XFreeGC(display, gc); + XDestroyWindow(display, window); } #endif \ No newline at end of file