[gtk+] quartz: zoom/rotate change compile/runtime check from 10.7 to 10.8



commit fe80230985b9c73515ad867cb49e3c7b769fa7de
Author: Friedrich Beckmann <friedrich beckmann gmx de>
Date:   Thu Apr 7 09:33:41 2016 +0200

    quartz: zoom/rotate change compile/runtime check from 10.7 to 10.8
    
    The zoom/rotate change for quartz does not build on 10.7. This change
    adds zoom/rotate support in quartz only for 10.8 and following. The
    problems is described here:
    https://bugzilla.gnome.org/show_bug.cgi?id=760276 and here
    https://trac.macports.org/ticket/51052
    NSEventPhaseMayBegin was only introduced in 10.8 although documentation
    says it is introduced in 10.7. Tests on 10.7 indicate that the phase
    property for the Magnify event is not supported at all on 10.7

 gdk/quartz/gdkevents-quartz.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
index 749cc02..62094a8 100644
--- a/gdk/quartz/gdkevents-quartz.c
+++ b/gdk/quartz/gdkevents-quartz.c
@@ -906,7 +906,7 @@ fill_crossing_event (GdkWindow       *toplevel,
    such that PINCH(STARTED), PINCH(UPDATE).... will not show a second
    PINCH(STARTED) event.
 */
-#ifdef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+#ifdef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
 static void
 fill_pinch_event (GdkWindow *window,
                   GdkEvent  *event,
@@ -1002,7 +1002,7 @@ fill_pinch_event (GdkWindow *window,
     }
   event->touchpad_pinch.scale = last_scale;
 }
-#endif /* OSX Version >= 10.7 */
+#endif /* OSX Version >= 10.8 */
 
 static void
 fill_button_event (GdkWindow *window,
@@ -1647,11 +1647,12 @@ gdk_event_translate (GdkEvent *event,
           }
       }
       break;
-#ifdef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+#ifdef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
     case NSEventTypeMagnify:
     case NSEventTypeRotate:
       /* Event handling requires [NSEvent phase] which was introduced in 10.7 */
-      if (gdk_quartz_osx_version () >= GDK_OSX_LION)
+      /* However - Tests on 10.7 showed that phase property does not work     */
+      if (gdk_quartz_osx_version () >= GDK_OSX_MOUNTAIN_LION)
         fill_pinch_event (window, event, nsevent, x, y, x_root, y_root);
       else
         return_val = FALSE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]