Usermode/AxWin3 - Compile fix
[tpg/acess2.git] / Usermode / Applications / axwin3_src / WM / ipc.c
index 5b600ee..4bb753e 100644 (file)
@@ -406,6 +406,20 @@ int IPC_Msg_CreateWin(tIPC_Client *Client, tAxWin_IPCMessage *Msg)
        return 0;
 }
 
+int IPC_Msg_DestroyWin(tIPC_Client *Client, tAxWin_IPCMessage *Msg)
+{
+       tWindow *win;
+       
+       ASSERT(Msg->ID == IPCMSG_DESTROYWIN);
+
+       win = IPC_int_GetWindow(Client, Msg->Window);
+       if( !win )
+               return 0;
+       
+       WM_DestroyWindow(win);
+       return 0;
+}
+
 int IPC_Msg_SetWindowTitle(tIPC_Client *Client, tAxWin_IPCMessage *Msg)
 {
        tWindow *win;
@@ -461,8 +475,8 @@ int IPC_Msg_FocusWindow(tIPC_Client *Client, tAxWin_IPCMessage *Msg)
        ASSERT(Msg->ID == IPCMSG_FOCUSWINDOW);
        
        // Don't allow the focus to be changed unless the client has the focus
-       if(!gpWM_FocusedWindow) return 1;
-       if(gpWM_FocusedWindow->Client != Client)        return 1;
+//     if(!gpWM_FocusedWindow) return 1;
+//     if(gpWM_FocusedWindow->Client != Client)        return 1;
 
        win = IPC_int_GetWindow(Client, Msg->Window);
        if(!win)        return 1;
@@ -525,7 +539,7 @@ int (*gIPC_MessageHandlers[])(tIPC_Client *Client, tAxWin_IPCMessage *Msg) = {
        IPC_Msg_GetDisplayDims,
        IPC_Msg_SendMsg,
        IPC_Msg_CreateWin,
-       NULL,   // Destroy window
+       IPC_Msg_DestroyWin,     // Destroy window
        IPC_Msg_SetWindowTitle,
        IPC_Msg_ShowWindow,
        IPC_Msg_DecorateWindow,

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