]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed MouseUp handling when window was captured
authorStefan Csomor <csomor@advancedconcepts.ch>
Mon, 14 Jan 2002 20:56:41 +0000 (20:56 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Mon, 14 Jan 2002 20:56:41 +0000 (20:56 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/app.cpp
src/mac/carbon/app.cpp

index 77da32475c888476782ae3e2d83959158f3790a8..8eb151e595b1e7a445e1be2cd0363f3ca7db3058 100644 (file)
@@ -1270,7 +1270,16 @@ void wxApp::MacHandleMouseUpEvent( WXEVENTREF evr )
     EventRecord* ev = (EventRecord*) evr ;
     WindowRef window;
 
-    short windowPart = ::FindWindow(ev->where, &window);
+    short windowPart = inNoWindow ;
+       if ( wxTheApp->s_captureWindow )
+       {
+               window = (WindowRef) s_captureWindow->MacGetRootWindow() ;
+               windowPart = inContent ;
+       } 
+       else
+       {
+               windowPart = ::FindWindow(ev->where, &window) ;
+       }
 
     switch (windowPart)
     {
index 77da32475c888476782ae3e2d83959158f3790a8..8eb151e595b1e7a445e1be2cd0363f3ca7db3058 100644 (file)
@@ -1270,7 +1270,16 @@ void wxApp::MacHandleMouseUpEvent( WXEVENTREF evr )
     EventRecord* ev = (EventRecord*) evr ;
     WindowRef window;
 
-    short windowPart = ::FindWindow(ev->where, &window);
+    short windowPart = inNoWindow ;
+       if ( wxTheApp->s_captureWindow )
+       {
+               window = (WindowRef) s_captureWindow->MacGetRootWindow() ;
+               windowPart = inContent ;
+       } 
+       else
+       {
+               windowPart = ::FindWindow(ev->where, &window) ;
+       }
 
     switch (windowPart)
     {