[97060] trunk/dports/graphics/wxWidgets-devel

raimue at macports.org raimue at macports.org
Sun Aug 26 02:52:48 PDT 2012


Revision: 97060
          https://trac.macports.org/changeset/97060
Author:   raimue at macports.org
Date:     2012-08-26 02:52:45 -0700 (Sun, 26 Aug 2012)
Log Message:
-----------
graphics/wxWidgets-devel:
Suppress runtime warnings about deprecated mouse events for Mac OS X >= 10.7,
closes #35301 (maintainer timeout)

Modified Paths:
--------------
    trunk/dports/graphics/wxWidgets-devel/Portfile

Added Paths:
-----------
    trunk/dports/graphics/wxWidgets-devel/files/patch-src-osx-cocoa-window.mm.diff

Modified: trunk/dports/graphics/wxWidgets-devel/Portfile
===================================================================
--- trunk/dports/graphics/wxWidgets-devel/Portfile	2012-08-26 09:29:08 UTC (rev 97059)
+++ trunk/dports/graphics/wxWidgets-devel/Portfile	2012-08-26 09:52:45 UTC (rev 97060)
@@ -8,6 +8,7 @@
 conflicts       wxgtk wxWidgets
 version         2.9.4
 epoch           20120709
+revision        1
 
 license         wxwidgets-3.1
 categories      graphics devel
@@ -60,7 +61,8 @@
 extract.only    ${distname}-${version}${extract.suffix}
 
 patch.dir   ${worksrcpath}/..
-patchfiles  patch-configure-change_install_names.diff
+patchfiles  patch-configure-change_install_names.diff \
+            patch-src-osx-cocoa-window.mm.diff
 
 configure.cmd   ../configure
 configure.ldflags   -L${build.dir}/lib -L${prefix}/lib

Added: trunk/dports/graphics/wxWidgets-devel/files/patch-src-osx-cocoa-window.mm.diff
===================================================================
--- trunk/dports/graphics/wxWidgets-devel/files/patch-src-osx-cocoa-window.mm.diff	                        (rev 0)
+++ trunk/dports/graphics/wxWidgets-devel/files/patch-src-osx-cocoa-window.mm.diff	2012-08-26 09:52:45 UTC (rev 97060)
@@ -0,0 +1,64 @@
+Upstream: http://trac.wxwidgets.org/changeset/72195
+--- src/osx/cocoa/window.mm (revision 72169)
++++ src/osx/cocoa/window.mm (revision 72195)
+@@ -456,4 +456,9 @@
+ - (CGFloat)deviceDeltaX;
+ - (CGFloat)deviceDeltaY;
++
++// 10.7+
++- (BOOL)hasPreciseScrollingDeltas;
++- (CGFloat)scrollingDeltaX;
++- (CGFloat)scrollingDeltaY;
+ @end
+ 
+@@ -610,21 +615,37 @@
+             wxevent.SetEventType( wxEVT_MOUSEWHEEL ) ;
+ 
+-            // see http://developer.apple.com/qa/qa2005/qa1453.html
+-            // for more details on why we have to look for the exact type
+-            
+-            const EventRef cEvent = (EventRef) [nsEvent eventRef];
+-            bool isMouseScrollEvent = false;
+-            if ( cEvent )
+-                isMouseScrollEvent = ::GetEventKind(cEvent) == kEventMouseScroll;
+-                
+-            if ( isMouseScrollEvent )
++            if ( UMAGetSystemVersion() >= 0x1070 )
+             {
+-                deltaX = [nsEvent deviceDeltaX];
+-                deltaY = [nsEvent deviceDeltaY];
++                if ( [nsEvent hasPreciseScrollingDeltas] )
++                {
++                    deltaX = [nsEvent scrollingDeltaX];
++                    deltaY = [nsEvent scrollingDeltaY];
++                }
++                else
++                {
++                    deltaX = [nsEvent scrollingDeltaX] * 10;
++                    deltaY = [nsEvent scrollingDeltaY] * 10;
++                }
+             }
+             else
+             {
+-                deltaX = ([nsEvent deltaX] * 10);
+-                deltaY = ([nsEvent deltaY] * 10);
++                const EventRef cEvent = (EventRef) [nsEvent eventRef];
++                // see http://developer.apple.com/qa/qa2005/qa1453.html
++                // for more details on why we have to look for the exact type
++
++                bool isMouseScrollEvent = false;
++                if ( cEvent )
++                    isMouseScrollEvent = ::GetEventKind(cEvent) == kEventMouseScroll;
++
++                if ( isMouseScrollEvent )
++                {
++                    deltaX = [nsEvent deviceDeltaX];
++                    deltaY = [nsEvent deviceDeltaY];
++                }
++                else
++                {
++                    deltaX = ([nsEvent deltaX] * 10);
++                    deltaY = ([nsEvent deltaY] * 10);
++                }
+             }
+             
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120826/d6fbd540/attachment.html>


More information about the macports-changes mailing list