]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/window.cpp
Removed deprecated parser.o from cocoa.t, reran tmake
[wxWidgets.git] / src / os2 / window.cpp
index d88927fcaeb0533b66225a84de4f4ff3a4ddac70..25610ad24863b1e170559b5cd6c8c934dab7461f 100644 (file)
@@ -1454,14 +1454,7 @@ void wxWindowOS2::SetDropTarget(
   wxDropTarget*                     pDropTarget
 )
 {
-    if (m_dropTarget != 0)
-    {
-        m_dropTarget->Revoke(m_hWnd);
-        delete m_dropTarget;
-    }
     m_dropTarget = pDropTarget;
-    if (m_dropTarget != 0)
-        m_dropTarget->Register(m_hWnd);
 } // end of wxWindowOS2::SetDropTarget
 #endif
 
@@ -2234,6 +2227,8 @@ static void wxYieldForCommandsOnly()
     {
         wxTheApp->DoMessage((WXMSG*)&vMsg);
     }
+    if (vMsg.msg == WM_QUIT)
+        ::WinPostMsg(NULL, WM_QUIT, 0, 0);
 }
 #endif // wxUSE_MENUS_NATIVE
 
@@ -2427,6 +2422,14 @@ bool wxWindowOS2::OS2ProcessMessage(
                                 pBtn->OS2Command(BN_CLICKED, 0 /* unused */);
                                 return TRUE;
                             }
+                            else if (!IsTopLevel())
+                            {
+                                //
+                                // if not a top level window, let parent
+                                // handle it
+                                //
+                                return FALSE;
+                            }
                             // else: but if it does not it makes sense to make
                             //       it work like a TAB - and that's what we do.
                             //       Note that Ctrl-Enter always works this way.
@@ -3510,9 +3513,7 @@ bool wxWindowOS2::HandleCreate(
 
 bool wxWindowOS2::HandleDestroy()
 {
-    wxWindowDestroyEvent            vEvent((wxWindow*)this);
-
-    (void)GetEventHandler()->ProcessEvent(vEvent);
+    SendDestroyEvent();
 
     //
     // Delete our drop target if we've got one
@@ -3520,7 +3521,6 @@ bool wxWindowOS2::HandleDestroy()
 #if wxUSE_DRAG_AND_DROP
     if (m_dropTarget != NULL)
     {
-        m_dropTarget->Revoke(m_hWnd);
         delete m_dropTarget;
         m_dropTarget = NULL;
     }
@@ -3977,6 +3977,21 @@ void wxWindowOS2::OnSysColourChanged(
 // painting
 // ---------------------------------------------------------------------------
 
+void wxWindow::OnPaint (
+  wxPaintEvent&                     rEvent
+)
+{
+    HDC                             hDC = (HDC)wxPaintDC::FindDCInCache((wxWindow*) rEvent.GetEventObject());
+
+    if (hDC != 0)
+    {
+        OS2DefWindowProc( (WXUINT)WM_PAINT
+                         ,(WXWPARAM)hDC
+                         ,(WXLPARAM)0
+                        );
+    }
+} // end of wxWindow::OnPaint
+
 bool wxWindowOS2::HandlePaint()
 {
     HRGN                            hRgn;