Index: /trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin.cpp	(revision 26698)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin.cpp	(revision 26699)
@@ -148,4 +148,19 @@
     return 0;
 #endif /* QT_MAC_USE_COCOA */
+}
+
+bool darwinSetFrontMostProcess()
+{
+    ProcessSerialNumber psn = { 0, kCurrentProcess };
+    return ::SetFrontProcess(&psn) == 0;
+}
+
+uint64_t darwinGetCurrentProcessId()
+{
+    uint64_t processId = 0;
+    ProcessSerialNumber psn = { 0, kCurrentProcess };
+    if (::GetCurrentProcess(&psn) == 0)
+        processId = RT_MAKE_U64(psn.lowLongOfPSN, psn.highLongOfPSN);
+    return processId;
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin.h	(revision 26698)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin.h	(revision 26699)
@@ -94,4 +94,6 @@
 int  darwinWindowToolBarHeight (NativeWindowRef aWindow);
 float darwinSmallFontSize();
+bool darwinSetFrontMostProcess();
+uint64_t darwinGetCurrentProcessId();
 
 RT_C_DECLS_END
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h	(revision 26698)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h	(revision 26699)
@@ -430,4 +430,5 @@
 #endif
 
+#endif
 #if defined (Q_WS_MAC) && defined (VBOX_GUI_USE_QUARTZ2D)
 #include <Carbon/Carbon.h>
@@ -496,5 +497,4 @@
 };
 #endif /* Q_WS_MAC && VBOX_GUI_USE_QUARTZ2D */
-#endif
 
 #endif // !___UIFrameBuffer_h___
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 26698)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 26699)
@@ -741,7 +741,8 @@
 #ifdef Q_WS_MAC
         /* Update Dock Overlay: */
-        if (machineWindowWrapper())
-            machineWindowWrapper()->updateDockOverlay();
-#endif
+        if (   machineWindowWrapper()
+            && machineWindowWrapper()->machineView())
+            machineWindowWrapper()->machineView()->updateDockOverlay();
+#endif /* Q_WS_MAC */
     }
 }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 26698)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 26699)
@@ -291,5 +291,7 @@
     //mVirtualBoxLogo = ::darwinToCGImageRef("VirtualBox_cube_42px.png");
     QString osTypeId = m_console.GetGuest().GetOSTypeId();
-    mDockIconPreview = new VBoxDockIconPreview(machineWindowWrapper(), vboxGlobal().vmGuestOSTypeIcon (osTypeId));
+
+    // TODO_NEW_CORE
+//    mDockIconPreview = new VBoxDockIconPreview(machineWindowWrapper(), vboxGlobal().vmGuestOSTypeIcon (osTypeId));
 
 # ifdef QT_MAC_USE_COCOA
@@ -419,9 +421,10 @@
              * drawing stuff ourself */
             pViewport->setAttribute(Qt::WA_PaintOnScreen);
-            mFrameBuf =
+//            mFrameBuf =
 #ifdef VBOX_WITH_VIDEOHWACCEL
-                    mAccelerate2DVideo ? new VBoxOverlayFrameBuffer<VBoxQuartz2DFrameBuffer>(this, &machineWindowWrapper()->session()) :
-#endif
-            	    new VBoxQuartz2DFrameBuffer(this);
+              // TODO_NEW_CORE
+//                    mAccelerate2DVideo ? new VBoxOverlayFrameBuffer<VBoxQuartz2DFrameBuffer>(this, &machineWindowWrapper()->session()) :
+#endif
+//            	    new UIFrameBufferQuartz2D(this);
             break;
 #endif
@@ -582,5 +585,5 @@
 
 #ifdef Q_WS_MAC
-void UIMachineLogic::sltChangeDockIconUpdate(const VBoxChangeDockIconUpdateEvent &event)
+void UIMachineView::sltChangeDockIconUpdate(const VBoxChangeDockIconUpdateEvent &event)
 {
     setDockIconEnabled(event.mChanged);
@@ -589,6 +592,9 @@
 
 # ifdef QT_MAC_USE_COCOA
-void UIMachineLogic::sltChangePresentationMode(const VBoxChangePresentationModeEvent &event)
-{
+void UIMachineView::sltChangePresentationMode(const VBoxChangePresentationModeEvent &event)
+{
+    // TODO_NEW_CORE
+    // this is full screen related
+#if 0
     if (mIsFullscreen)
     {
@@ -607,4 +613,5 @@
     else
         SetSystemUIMode(kUIModeNormal, 0);
+#endif
 }
 # endif /* QT_MAC_USE_COCOA */
@@ -2041,8 +2048,9 @@
         }
 #elif defined (Q_WS_MAC)
-        if (aUniKey && aUniKey [0] && !aUniKey [1])
-            processed = processHotKey (QKeySequence (Qt::UNICODE_ACCEL +
-                                                     QChar (aUniKey [0]).toUpper().unicode()),
-                                       machineWindowWrapper()->menuBar()->actions());
+        // TODO_NEW_CORE
+//        if (aUniKey && aUniKey [0] && !aUniKey [1])
+//            processed = processHotKey (QKeySequence (Qt::UNICODE_ACCEL +
+//                                                     QChar (aUniKey [0]).toUpper().unicode()),
+//                                       machineWindowWrapper()->menuBar()->actions());
 
         /* Don't consider the hot key as pressed since the guest never saw
@@ -2543,16 +2551,18 @@
         {
 # if defined (VBOX_GUI_USE_QUARTZ2D)
-            if (mode == VBoxDefs::Quartz2DMode)
-            {
+                // TODO_NEW_CORE
+//            if (mode == VBoxDefs::Quartz2DMode)
+//            {
                 /* If the render mode is Quartz2D we could use the CGImageRef
                  * of the framebuffer for the dock icon creation. This saves
                  * some conversion time. */
-                mDockIconPreview->updateDockPreview (static_cast <VBoxQuartz2DFrameBuffer *> (mFrameBuf)->imageRef());
-            }
-            else
+//                mDockIconPreview->updateDockPreview (static_cast <VBoxQuartz2DFrameBuffer *> (mFrameBuf)->imageRef());
+//            }
+//            else
 # endif
                 /* In image mode we have to create the image ref out of the
                  * framebuffer */
-                mDockIconPreview->updateDockPreview (mFrameBuf);
+                // TODO_NEW_CORE
+//                mDockIconPreview->updateDockPreview (mFrameBuf);
         }
     }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h	(revision 26698)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h	(revision 26699)
@@ -36,4 +36,13 @@
 #include "UIMachineDefs.h"
 
+#ifdef Q_WS_MAC
+# include <CoreFoundation/CFBase.h>
+#endif /* Q_WS_MAC */
+
+/* Local forward declarations */
+class VBoxChangeDockIconUpdateEvent;
+class VBoxChangePresentationModeEvent;
+class VBoxDockIconPreview;
+
 class UIMachineView : public QAbstractScrollArea
 {
@@ -66,4 +75,11 @@
     void setIgnoreGuestResize(bool bIgnore);
     void setMouseIntegrationEnabled(bool bEnabled);
+
+#if defined(Q_WS_MAC)
+    void updateDockIcon();
+    void updateDockOverlay();
+    void setDockIconEnabled(bool aOn) { mDockIconEnabled = aOn; };
+    void setMouseCoalescingEnabled(bool aOn);
+#endif
 
 signals:
@@ -133,12 +149,12 @@
 #if defined(Q_WS_WIN32)
     bool winLowKeyboardEvent(UINT msg, const KBDLLHOOKSTRUCT &event);
-    bool winEvent (MSG *aMsg, long *aResult);
+    bool winEvent(MSG *aMsg, long *aResult);
 #elif defined(Q_WS_PM)
-    bool pmEvent (QMSG *aMsg);
+    bool pmEvent(QMSG *aMsg);
 #elif defined(Q_WS_X11)
-    bool x11Event (XEvent *event);
+    bool x11Event(XEvent *event);
 #elif defined(Q_WS_MAC)
-    bool darwinKeyboardEvent (const void *pvCocoaEvent, EventRef inEvent);
-    void darwinGrabKeyboardEvents (bool fGrab);
+    bool darwinKeyboardEvent(const void *pvCocoaEvent, EventRef inEvent);
+    void darwinGrabKeyboardEvents(bool fGrab);
 #endif
 #if defined (Q_WS_WIN32)
@@ -184,10 +200,4 @@
 #ifdef VBOX_WITH_VIDEOHWACCEL
     void scrollContentsBy(int dx, int dy);
-#endif
-#if defined(Q_WS_MAC)
-    void updateDockIcon();
-    void updateDockOverlay();
-    void setDockIconEnabled(bool aOn) { mDockIconEnabled = aOn; };
-    void setMouseCoalescingEnabled(bool aOn);
 #endif
     void onStateChange(KMachineState state);
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 26698)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 26699)
@@ -32,4 +32,6 @@
 #include "UIMachineWindow.h"
 
+#include "VBoxUtils.h"
+
 /* Guest mouse pointer shape change event: */
 class UIMousePointerShapeChangeEvent : public QEvent
@@ -475,7 +477,5 @@
             return S_OK;
 
-        ProcessSerialNumber psn = { 0, kCurrentProcess };
-        OSErr rc = ::SetFrontProcess(&psn);
-        if (!rc)
+        if (::darwinSetFrontMostProcess())
             QApplication::postEvent(m_pEventHandler, new UIShowWindowEvent);
         else
@@ -484,7 +484,5 @@
              * (This is just a precaution should Mac OS X start imposing the same sensible
              * focus stealing restrictions that other window managers implement). */
-            AssertMsgFailed(("SetFrontProcess -> %#x\n", rc));
-            if (::GetCurrentProcess(&psn))
-                *puWinId = RT_MAKE_U64(psn.lowLongOfPSN, psn.highLongOfPSN);
+            *puWinId = ::darwinGetCurrentProcessId();
         }
 #else
@@ -779,6 +777,9 @@
              * what. So, I'll just always show & activate the stupid window to
              * make it get out of the dock when the user wishes to show a VM. */
+#if 0
+            // TODO_NEW_CORE
             window()->show();
             window()->activateWindow();
+#endif
             return true;
         }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp	(revision 26698)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp	(revision 26699)
@@ -37,4 +37,6 @@
 #include "UIMachineView.h"
 
+#include "VBoxUtils.h"
+
 UIMachineLogicNormal::UIMachineLogicNormal(QObject *pParent, UISession *pSession, UIActionsPool *pActionsPool)
     : UIMachineLogic(pParent, pSession, pActionsPool, UIVisualStateType_Normal)
@@ -115,6 +117,5 @@
     /* We have to make sure that we are getting the front most process.
      * This is necessary for Qt versions > 4.3.3: */
-    ProcessSerialNumber psn = { 0, kCurrentProcess };
-    ::SetFrontProcess(&psn);
+    ::darwinSetFrontMostProcess();
 #endif /* Q_WS_MAC */
 
