]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/window.cpp
Rewind the input stream after failing to load image from it.
[wxWidgets.git] / src / os2 / window.cpp
index 240666554d3979560a9e6583ad40f33ceadea7b8..fdf6d3a87b37ad49090b6f8d11559e2e868fddb0 100644 (file)
@@ -1788,7 +1788,6 @@ bool wxWindowOS2::DoPopupMenu( wxMenu* pMenu, int nX, int nY )
     bool bIsWaiting = true;
     int nHeight;
 
     bool bIsWaiting = true;
     int nHeight;
 
-    pMenu->SetInvokingWindow(this);
     pMenu->UpdateUI();
 
     if ( nX == -1 && nY == -1 )
     pMenu->UpdateUI();
 
     if ( nX == -1 && nY == -1 )
@@ -1824,7 +1823,6 @@ bool wxWindowOS2::DoPopupMenu( wxMenu* pMenu, int nX, int nY )
         ::WinDispatchMsg(vHabmain, (PQMSG)&vMsg);
     }
 
         ::WinDispatchMsg(vHabmain, (PQMSG)&vMsg);
     }
 
-    pMenu->SetInvokingWindow(NULL);
     return true;
 } // end of wxWindowOS2::DoPopupMenu
 #endif // wxUSE_MENUS_NATIVE
     return true;
 } // end of wxWindowOS2::DoPopupMenu
 #endif // wxUSE_MENUS_NATIVE
@@ -3040,11 +3038,7 @@ bool wxWindowOS2::HandleDestroy()
     // Delete our drop target if we've got one
     //
 #if wxUSE_DRAG_AND_DROP
     // Delete our drop target if we've got one
     //
 #if wxUSE_DRAG_AND_DROP
-    if (m_dropTarget != NULL)
-    {
-        delete m_dropTarget;
-        m_dropTarget = NULL;
-    }
+    wxDELETE(m_dropTarget);
 #endif // wxUSE_DRAG_AND_DROP
 
     //
 #endif // wxUSE_DRAG_AND_DROP
 
     //
@@ -3224,7 +3218,7 @@ bool wxWindowOS2::OS2OnDrawItem( int vId,
                                           ,pMeasureStruct->rclItem.yTop - pMeasureStruct->rclItem.yBottom
                                          );
 
                                           ,pMeasureStruct->rclItem.yTop - pMeasureStruct->rclItem.yBottom
                                          );
 
-       wxPMDCImpl *impl = (wxPMDCImpl*) vDc.GetImpl();
+        wxPMDCImpl *impl = (wxPMDCImpl*) vDc.GetImpl();
         impl->SetHDC( hDC, false );
         impl->SetHPS( pMeasureStruct->hps );
         //
         impl->SetHDC( hDC, false );
         impl->SetHPS( pMeasureStruct->hps );
         //