menu works on windows

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@139 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-03 16:13:11 +00:00
parent 6db4808815
commit 06b2178ecc
5 changed files with 63 additions and 26 deletions

View File

@@ -56,6 +56,12 @@ static LRESULT CALLBACK wndproc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) {
SetCapture(NULL);
MwLLDispatch(u->ll, up, &p);
InvalidateRect(hWnd, NULL, FALSE);
} else if(msg == WM_MOUSEMOVE) {
MwPoint p;
p.x = LOWORD(lp);
p.y = HIWORD(lp);
MwLLDispatch(u->ll, move, &p);
} else if(msg == WM_SIZE) {
MwLLDispatch(u->ll, resize, NULL);
} else if(msg == WM_ERASEBKGND) {
@@ -310,6 +316,6 @@ void MwLLSetIcon(MwLL handle, MwLLPixmap pixmap) {
DestroyIcon(ico);
}
void MwLLForceRender(MwLL handle){
void MwLLForceRender(MwLL handle) {
InvalidateRect(handle->hWnd, NULL, FALSE);
}

View File

@@ -328,11 +328,11 @@ void MwLLSetIcon(MwLL handle, MwLLPixmap pixmap) {
free(icon);
}
void MwLLForceRender(MwLL handle){
void MwLLForceRender(MwLL handle) {
XEvent ev;
memset(&ev, 0, sizeof(ev));
ev.type = Expose;
ev.type = Expose;
ev.xexpose.window = handle->window;
XSendEvent(handle->display, handle->window, False, ExposureMask, &ev);
}