Usermode/AxWin3 - Cleaned up focus code a little, added IPC focus call
[tpg/acess2.git] / Usermode / Applications / axwin3_src / libaxwin3.so_src / wm.c
index a03aa9a..d64bcbc 100644 (file)
@@ -54,7 +54,7 @@ tWindow *AxWin3_int_GetWindowFromID(uint32_t ServerID)
 tWindow *AxWin3_int_AllocateWindowInfo(int DataBytes, int *WinID)
 {
         int    idx, newWinID;
-       tWindowBlock *block, *prev;
+       tWindowBlock *block, *prev = NULL;
        tWindow *ret;   
 
        block = &gAxWin3_WindowList;
@@ -212,6 +212,16 @@ void AxWin3_SendMessage(tHWND Window, tHWND Destination, int Message, int Length
        free(msg);
 }
 
+void AxWin3_FocusWindow(tHWND Window)
+{
+       tAxWin_IPCMessage       *msg;
+       
+       msg = AxWin3_int_AllocateIPCMessage(Window, IPCMSG_FOCUSWINDOW, 0, 0);
+       
+       AxWin3_int_SendIPCMessage(msg);
+       free(msg);
+}
+
 void AxWin3_ShowWindow(tHWND Window, int bShow)
 {
        tAxWin_IPCMessage       *msg;

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