]> git.mdlowis.com Git - projs/tide.git/commitdiff
set default pointer style for root window
authorMichael D. Lowis <mike.lowis@gentex.com>
Wed, 14 Aug 2019 15:23:41 +0000 (11:23 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Wed, 14 Aug 2019 15:23:41 +0000 (11:23 -0400)
src/anvil.c

index 581a3cc9d9fdac834715b5d77efa104a1b1f7a81..57ccc17bb3236a3ef379f4bd66600ce082a28d93 100644 (file)
@@ -36,6 +36,7 @@ typedef struct Column {
 XConf X = {0};
 Client* Clients = NULL;
 Cursor Move_Cursor;
+Cursor Main_Cursor;
 int StartY = 0;
 
 Column* Columns = NULL;
@@ -357,6 +358,7 @@ static void xexpose(XConf* x, XEvent* e) {
 #pragma GCC diagnostic pop
 
 int main(void) {
+    /* initialize basic x11 handling */
     x11_init(&X);
     X.font = x11_font_load(&X, Fonts[0]);
     XSelectInput(X.display, X.root, SubstructureRedirectMask|SubstructureNotifyMask);
@@ -364,7 +366,12 @@ int main(void) {
     if (x11_error_get())
         die("Could not start. Is another WM running?\n");
 
+    /* setup cursors */
+    Main_Cursor = XCreateFontCursor(X.display, XC_left_ptr);
     Move_Cursor = XCreateFontCursor(X.display, XC_draped_box);
+    XDefineCursor(X.display, X.root, Main_Cursor);
+
+    /* register e vent handlers */
     X.eventfns[ButtonPress] = xbtnpress;
     X.eventfns[ButtonRelease] = xbtnrelease;
     X.eventfns[ConfigureRequest] = xconfigrequest;