X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FApplications%2Faxwin3_src%2FWM%2Fwm.c;h=cc9d81d073392838f32933aed07aa93fe8857e9a;hb=94d9540cae85d2f9e145fe4d2986e84b46bbd052;hp=1de599b3021feccde3ad6f7f4933dbe65cf31a3b;hpb=e3b5f81f2af81fbb2f2b0f449f71324e63f9a645;p=tpg%2Facess2.git diff --git a/Usermode/Applications/axwin3_src/WM/wm.c b/Usermode/Applications/axwin3_src/WM/wm.c index 1de599b3..cc9d81d0 100644 --- a/Usermode/Applications/axwin3_src/WM/wm.c +++ b/Usermode/Applications/axwin3_src/WM/wm.c @@ -117,13 +117,15 @@ void WM_DestroyWindow(tWindow *Window) // - Remove from inheritance tree? // - Clean up render children - // Lock should not be needed - tWindow *win, *next; - for( win = Window->FirstChild; win; win = next ) { - next = win->NextSibling; - ASSERT(Window->FirstChild->Parent == Window); - WM_DestroyWindow(win); + // Lock should not be needed + tWindow *win, *next; + for( win = Window->FirstChild; win; win = next ) + { + next = win->NextSibling; + ASSERT(Window->FirstChild->Parent == Window); + WM_DestroyWindow(win); + } } // - Clean up inheriting children? @@ -133,7 +135,10 @@ void WM_DestroyWindow(tWindow *Window) Window->Renderer->DestroyWindow(Window); else _SysDebug("WARN: Renderer %s does not have a destroy function", Window->Renderer->Name); - + + // - Tell client to clean up + WM_SendMessage(NULL, Window, WNDMSG_DESTROY, 0, NULL); + // - Clean up render cache and window structure free(Window->Title); free(Window->RenderBuffer); @@ -356,7 +361,7 @@ int WM_ResizeWindow(tWindow *Window, int W, int H) if( Window->W == W && Window->H == H ) return 0; - _SysDebug("WM_Resizeindow: %ix%i", W, H); + _SysDebug("WM_ResizeWindow: %ix%i", W, H); Window->W = W; Window->H = H; if(Window->RenderBuffer) {