diff --git a/src/alock.c b/src/alock.c index 31299db..409b3f7 100644 --- a/src/alock.c +++ b/src/alock.c @@ -174,8 +174,8 @@ static void initXInfo(struct aXInfo* xi) { xi->root = (Window*)calloc((size_t)xi->nr_screens, sizeof(Window)); xi->colormap = (Colormap*)calloc((size_t)xi->nr_screens, sizeof(Colormap)); xi->cursor = (Cursor*)calloc((size_t)xi->nr_screens, sizeof(Cursor)); - xi->width_of_root = calloc(xi->nr_screens, sizeof(int)); - xi->height_of_root = calloc(xi->nr_screens, sizeof(int)); + xi->width_of_root = (int*)calloc(xi->nr_screens, sizeof(int)); + xi->height_of_root = (int*)calloc(xi->nr_screens, sizeof(int)); } { XWindowAttributes xgwa; @@ -314,6 +314,11 @@ static int eventLoop(struct aOpts* opts, struct aXInfo* xi) { break; } break; + case Expose: { + XExposeEvent* eev = (XExposeEvent*)&ev; + XClearWindow(xi->display, eev->window); + } + break; default: break; }