]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/classic/window.cpp
invalidate best size cache when GTK style changes
[wxWidgets.git] / src / mac / classic / window.cpp
index a5c56e42028dabb7f72c35d08e9370bf3808bb47..037b9af61efa6d6112b6faecf56a76ad24a7e37b 100644 (file)
@@ -73,8 +73,6 @@ wxWindowMac* gFocusWindow = NULL ;
 BEGIN_EVENT_TABLE(wxWindowMac, wxWindowBase)
   EVT_NC_PAINT(wxWindowMac::OnNcPaint)
   EVT_ERASE_BACKGROUND(wxWindowMac::OnEraseBackground)
-  EVT_SYS_COLOUR_CHANGED(wxWindowMac::OnSysColourChanged)
-  EVT_INIT_DIALOG(wxWindowMac::OnInitDialog)
   EVT_SET_FOCUS(wxWindowMac::OnSetFocus)
   EVT_MOUSE_EVENTS(wxWindowMac::OnMouseEvent)
 END_EVENT_TABLE()
@@ -364,7 +362,16 @@ bool wxWindowMac::DoPopupMenu(wxMenu *menu, int x, int y)
 {
     menu->SetInvokingWindow(this);
     menu->UpdateUI();
-    ClientToScreen( &x , &y ) ;
+    
+    if ( x == -1 && y == -1 )
+    {
+        wxPoint mouse = wxGetMousePosition();
+        x = mouse.x; y = mouse.y;
+    }
+    else
+    {
+        ClientToScreen( &x , &y ) ;
+    }
 
     menu->MacBeforeDisplay( true ) ;
     long menuResult = ::PopUpMenuSelect((MenuHandle) menu->GetHMenu() ,y,x, 0) ;