fix graphic bug

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@85 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
Nishi 2025-10-01 00:43:09 +00:00
commit a95e2d0e45
5 changed files with 14 additions and 7 deletions

View file

@ -34,7 +34,8 @@ MwLL MwLLCreate(MwLL parent, int x, int y, int width, int height) {
r->display = parent->display;
p = parent->window;
}
r->window = XCreateSimpleWindow(r->display, p, x, y, width, height, 0, 0, WhitePixel(r->display, XDefaultScreen(r->display)));
r->window = XCreateSimpleWindow(r->display, p, x, y, width, height, 0, 0, WhitePixel(r->display, XDefaultScreen(r->display)));
r->copy_buffer = 1;
r->width = width;
r->height = height;
@ -168,7 +169,7 @@ void MwLLNextEvent(MwLL handle) {
MwLLGetXYWH(handle, &x, &y, &w, &h);
MwLLDispatch(handle, draw);
XCopyArea(handle->display, handle->pixmap, handle->window, handle->gc, 0, 0, w, h, 0, 0);
if(handle->copy_buffer) XCopyArea(handle->display, handle->pixmap, handle->window, handle->gc, 0, 0, w, h, 0, 0);
}
}
}