Minor misc fixes
[tpg/acess2.git] / Usermode / Applications / axwin3_src / WM / wm.c
index e200700..cc7e86e 100644 (file)
@@ -13,6 +13,7 @@
 #include <wm_messages.h>
 #include <decorator.h>
 #include <axwin3/keysyms.h>
+#include <wm_hotkeys.h>
 
 // === IMPORTS ===
 extern int     Renderer_Menu_Init(void);
@@ -24,6 +25,7 @@ extern int    Renderer_RichText_Init(void);
 extern void    IPC_SendWMMessage(tIPC_Client *Client, uint32_t Src, uint32_t Dst, int Msg, int Len, const void *Data);
 extern void    IPC_SendReply(tIPC_Client *Client, uint32_t WinID, int MsgID, size_t Len, const void *Data);
 extern tWindow *IPC_int_GetWindow(tIPC_Client *Client, uint32_t ID);
+extern void    IPC_int_SetWindow(tIPC_Client *Client, uint32_t ID, tWindow *Window);
 
 // === GLOBALS ===
 tWMRenderer    *gpWM_Renderers;
@@ -145,7 +147,8 @@ void WM_DestroyWindow(tWindow *Window)
                        Window->Parent->LastChild = prev;
        }
        // - Full invalidate
-       WM_Invalidate(Window, 1);
+       WM_Invalidate(Window, 0);
+       Window->Parent->Flags &= ~WINFLAG_CLEAN;        // Mark parent as unclean, forcing redraw
        
        // - Remove from inheritance tree?
        
@@ -176,6 +179,7 @@ void WM_DestroyWindow(tWindow *Window)
        free(Window->Title);
        free(Window->RenderBuffer);
        free(Window);
+       IPC_int_SetWindow(Window->Client, Window->ID, NULL);
 }
 
 tWindow *WM_GetWindowByID(tWindow *Requester, uint32_t ID)
@@ -598,6 +602,7 @@ void WM_int_BlitWindow(tWindow *Window, int bForceReblit)
                bForceReblit = 1;
        }
        
+       // Draw cursor
        if( Window == gpWM_FocusedWindow && Window->CursorW )
        {
                Video_FillRect(

UCC git Repository :: git.ucc.asn.au