Index: trunk/src/user32/oslibmsgtranslate.cpp
===================================================================
--- trunk/src/user32/oslibmsgtranslate.cpp	(revision 10272)
+++ trunk/src/user32/oslibmsgtranslate.cpp	(revision 10275)
@@ -1,3 +1,3 @@
-/* $Id: oslibmsgtranslate.cpp,v 1.115 2003-08-08 13:30:19 sandervl Exp $ */
+/* $Id: oslibmsgtranslate.cpp,v 1.116 2003-10-20 17:17:21 sandervl Exp $ */
 /*
  * Window message translation functions for OS/2
@@ -68,7 +68,9 @@
 {
   // check if the single slot is occupied already
-  if (teb->o.odin.fTranslated == TRUE)
-    // there's still an already translated message to be processed
-    return FALSE;
+  if (teb->o.odin.fTranslated == TRUE) {
+      // there's still an already translated message to be processed
+      dprintf(("WARNING: translated message already pending!"));
+      return FALSE;
+  }
 
   teb->o.odin.fTranslated = TRUE;
Index: trunk/src/user32/oslibwin.cpp
===================================================================
--- trunk/src/user32/oslibwin.cpp	(revision 10272)
+++ trunk/src/user32/oslibwin.cpp	(revision 10275)
@@ -1,3 +1,3 @@
-/* $Id: oslibwin.cpp,v 1.143 2003-04-23 18:00:58 sandervl Exp $ */
+/* $Id: oslibwin.cpp,v 1.144 2003-10-20 17:17:22 sandervl Exp $ */
 /*
  * Window API wrappers for OS/2
@@ -92,4 +92,5 @@
 
     dprintf(("WinCreateWindow %x %s %x task %d shell %d classstyle %x winstyle %x bottom %d", hwndParent, pszName, id, fTaskList, fShellPosition, classStyle, dwWinStyle, fHWND_BOTTOM));
+    dprintf(("WinCreateWindow parent %x, owner %x", hwndParent, Owner));
 
     //Must not use WS_CLIPCHILDREN style with frame window. Transparency won't work otherwise.
Index: trunk/src/user32/pmwindow.cpp
===================================================================
--- trunk/src/user32/pmwindow.cpp	(revision 10272)
+++ trunk/src/user32/pmwindow.cpp	(revision 10275)
@@ -1,3 +1,3 @@
-/* $Id: pmwindow.cpp,v 1.219 2003-08-22 13:16:45 sandervl Exp $ */
+/* $Id: pmwindow.cpp,v 1.220 2003-10-20 17:17:22 sandervl Exp $ */
 /*
  * Win32 Window Managment Code for OS/2
@@ -19,4 +19,5 @@
 #define INCL_DOSDEVIOCTL
 #define INCL_WINTRACKRECT
+#define INCL_BASE
 
 #include <os2wrap.h>
@@ -53,4 +54,5 @@
 #include <winscan.h>
 #include <oslibdnd.h>
+#include <custombuild.h>
 #include <win\dbt.h>
 #include "dragdrop.h"
@@ -504,5 +506,7 @@
  POSTMSG_PACKET  *postmsg;
  OSLIBPOINT       point, ClientPoint;
-
+ EXCEPTIONREGISTRATIONRECORD exceptRegRec = {0,0};
+
+    ODIN_SetExceptionHandler(&exceptRegRec);
     // restore our FS selector
     SetWin32TIB();
@@ -581,4 +585,5 @@
         RELEASE_WNDOBJ(win32wnd);
         RestoreOS2TIB();
+        ODIN_UnsetExceptionHandler(&exceptRegRec);
 
 #ifdef DEBUG
@@ -749,10 +754,15 @@
     }
    
+#ifdef DEBUG
     case WM_SETFOCUS:
     {
         HWND hwndFocus = (HWND)mp1;
         dprintf(("OS2: WM_SETFOCUS %x %x (%x) %d cur focus %x", win32wnd->getWindowHandle(), mp1, OS2ToWin32Handle(hwndFocus), mp2, WinQueryFocus(HWND_DESKTOP)));
-        break;
-    }
+        if(WinQueryFocus(HWND_DESKTOP) == win32wnd->getOS2FrameWindowHandle()) {
+            dprintf(("WARNING: Focus set to frame window"));
+        }
+        break;
+    }
+#endif
 
     //Handle all focus processed during WM_FOCUSCHANGED; PM doesn't like focus
@@ -1148,4 +1158,5 @@
     if(win32wnd) RELEASE_WNDOBJ(win32wnd);
     RestoreOS2TIB();
+    ODIN_UnsetExceptionHandler(&exceptRegRec);
 
 #ifdef DEBUG
@@ -1157,5 +1168,7 @@
 //  dprintf(("OS2: RunDefWndProc msg %x for %x", msg, hwnd));
     if(win32wnd) RELEASE_WNDOBJ(win32wnd);
+
     RestoreOS2TIB();
+    ODIN_UnsetExceptionHandler(&exceptRegRec);
 
 #ifdef DEBUG
@@ -1174,4 +1187,5 @@
  MRESULT          rc = 0;
  MSG              winMsg, *pWinMsg;
+ EXCEPTIONREGISTRATIONRECORD exceptRegRec = {0,0};
 
 #ifdef DEBUG
@@ -1179,4 +1193,5 @@
 #endif
 
+    ODIN_SetExceptionHandler(&exceptRegRec);
     //Restore our FS selector
     SetWin32TIB();
@@ -1890,5 +1905,5 @@
         rc = pfnFrameWndProc(hwnd, msg, mp1, mp2);
         SetWin32TIB();
-        dprintf2(("PMFRAME:WM_QUERYFOCUSCHAIN %x fsCmd %x parent %x returned %x", win32wnd->getWindowHandle(), SHORT1FROMMP(mp1), (mp2) ? OS2ToWin32Handle((DWORD)mp2) : 0, (rc) ? OS2ToWin32Handle((DWORD)rc) : 0));
+        dprintf2(("PMFRAME:WM_QUERYFOCUSCHAIN %x fsCmd %x parent %x returned %x (%x)", win32wnd->getWindowHandle(), SHORT1FROMMP(mp1), (mp2) ? OS2ToWin32Handle((DWORD)mp2) : 0, (rc) ? OS2ToWin32Handle((DWORD)rc) : 0, rc));
         break;
 //        goto RunDefFrameWndProc;
@@ -2164,4 +2179,5 @@
     if(win32wnd) RELEASE_WNDOBJ(win32wnd);
     RestoreOS2TIB();
+    ODIN_UnsetExceptionHandler(&exceptRegRec);
 
 #ifdef DEBUG
@@ -2174,4 +2190,5 @@
     if(win32wnd) RELEASE_WNDOBJ(win32wnd);
     RestoreOS2TIB();
+    ODIN_UnsetExceptionHandler(&exceptRegRec);
 
 #ifdef DEBUG
@@ -2184,4 +2201,6 @@
     if(win32wnd) RELEASE_WNDOBJ(win32wnd);
     RestoreOS2TIB();
+    ODIN_UnsetExceptionHandler(&exceptRegRec);
+
     //calling WinDefWindowProc here breaks Opera hotlist window (WM_ADJUSTWINDOWPOS)
 //    return pfnFrameWndProc(hwnd, msg, mp1, mp2);
@@ -2200,4 +2219,5 @@
     TEB             *teb;
     MRESULT          rc = 0;
+    EXCEPTIONREGISTRATIONRECORD exceptRegRec = {0,0};
 
     //Restore our FS selector
@@ -2218,4 +2238,6 @@
     RestoreOS2TIB();
     rc = pfnOldWindowProc(hwnd, msg, mp1, mp2);
+
+    ODIN_SetExceptionHandler(&exceptRegRec);
     SetWin32TIB();
     switch(msg) {
@@ -2239,4 +2261,5 @@
     if(win32wnd) RELEASE_WNDOBJ(win32wnd);
     RestoreOS2TIB();
+    ODIN_UnsetExceptionHandler(&exceptRegRec);
     return rc;
 
Index: trunk/src/user32/user32.cpp
===================================================================
--- trunk/src/user32/user32.cpp	(revision 10272)
+++ trunk/src/user32/user32.cpp	(revision 10275)
@@ -1,3 +1,3 @@
-/* $Id: user32.cpp,v 1.128 2003-08-01 10:07:43 sandervl Exp $ */
+/* $Id: user32.cpp,v 1.129 2003-10-20 17:17:23 sandervl Exp $ */
 
 /*
@@ -117,5 +117,6 @@
       return FALSE;
     }
-
+ 
+    dprintf2(("USER32:  EqualRect (%d,%d)(%d,%d) (%d,%d)(%d,%d)", lprc1->left, lprc1->top, lprc1->right, lprc1->bottom, lprc2->left, lprc2->top, lprc2->right, lprc2->bottom));
     return (lprc1->left == lprc2->left &&
             lprc1->right == lprc2->right &&
@@ -167,4 +168,5 @@
       lprcDst->top    = MAX(lprcSrc1->top,lprcSrc2->top);
       lprcDst->bottom = MIN(lprcSrc1->bottom,lprcSrc2->bottom);
+      dprintf2(("USER32: IntersectRect result: (%d,%d)(%d,%d)", lprcDst->left, lprcDst->top, lprcDst->right, lprcDst->bottom));
     }
 
Index: trunk/src/user32/win32wbase.cpp
===================================================================
--- trunk/src/user32/win32wbase.cpp	(revision 10272)
+++ trunk/src/user32/win32wbase.cpp	(revision 10275)
@@ -1,3 +1,3 @@
-/* $Id: win32wbase.cpp,v 1.378 2003-10-06 09:49:38 sandervl Exp $ */
+/* $Id: win32wbase.cpp,v 1.379 2003-10-20 17:17:23 sandervl Exp $ */
 /*
  * Win32 Window Base Class for OS/2
@@ -505,5 +505,5 @@
                                    dwOSFrameStyle,
                                    (char *)windowNameA,
-                                   (owner) ? owner->getOS2WindowHandle() : hwndOS2Frame,
+                                   (owner) ? owner->getOS2WindowHandle() : 0,
                                    (hwndLinkAfter == HWND_BOTTOM) ? TRUE : FALSE,
                                    0,
