bad solution

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@30 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-09-28 21:55:50 +00:00
parent c2b08729ef
commit 61b442d259
7 changed files with 92 additions and 63 deletions

View File

@@ -9,11 +9,14 @@ MilskoLL MilskoLLCreate(MilskoLL parent, int x, int y, int width, int height) {
Window root;
unsigned int border, depth;
r = malloc(sizeof(*r));
r->x = x;
r->y = y;
r->width = width;
r->height = height;
r = malloc(sizeof(*r));
r->x = x;
r->y = y;
r->width = width;
r->height = height;
r->callback = malloc(sizeof(*r->callback));
memset(r->callback, 0, sizeof(*r->callback));
if(parent == NULL) {
r->display = XOpenDisplay(NULL);
@@ -114,7 +117,7 @@ void MilskoLLNextEvent(MilskoLL handle) {
XEvent ev;
if(XCheckWindowEvent(handle->display, handle->window, mask, &ev)) {
if(ev.type == Expose) {
if(handle->draw != NULL) handle->draw(handle);
MilskoLLDispatch(handle, draw);
}
}
}