Index: /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/CocoaEventHelper.mm
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/CocoaEventHelper.mm	(revision 85333)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/CocoaEventHelper.mm	(revision 85334)
@@ -216,5 +216,9 @@
     NSWindow *pEventWindow = [pEvent window];
     NSInteger iEventWindow = [pEvent windowNumber];
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    NSGraphicsContext *pEventGraphicsContext = nil; /* NSEvent::context is deprecated and said to always return nil. */
+#else
     NSGraphicsContext *pEventGraphicsContext = [pEvent context];
+#endif
 
     printf("%s%p: Type=%lu Modifiers=%08lx pWindow=%p #Wnd=%ld pGraphCtx=%p %s\n",
@@ -340,5 +344,9 @@
                                            timestamp:[pEvent timestamp] // [NSDate timeIntervalSinceReferenceDate] ?
                                         windowNumber:[pEvent windowNumber]
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+                                             context:nil /* NSEvent::context is deprecated and said to always return nil. */
+#else
                                              context:[pEvent context]
+#endif
                                          eventNumber:[pEvent eventNumber]
                                           clickCount:[pEvent clickCount]
