From: Michael D. Lowis Date: Wed, 14 Aug 2019 15:23:41 +0000 (-0400) Subject: set default pointer style for root window X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=580676b8ec24dacc2baf2ec3b790ffc849452846;p=projs%2Ftide.git set default pointer style for root window --- diff --git a/src/anvil.c b/src/anvil.c index 581a3cc..57ccc17 100644 --- a/src/anvil.c +++ b/src/anvil.c @@ -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;