Index: trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp	(revision 98502)
+++ trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp	(revision 98503)
@@ -63,4 +63,5 @@
 #include "CKeyboard.h"
 #include "CMediumAttachment.h"
+#include "CMouse.h"
 #include "CNATNetwork.h"
 #include "CNetworkAdapter.h"
@@ -932,4 +933,13 @@
         QApplication::translate("UIMessageCenter", "Failed to assign keyboard parameter.") +
         UIErrorString::formatErrorInfo(comKeyboard));
+}
+
+/* static */
+void UINotificationMessage::cannotChangeMouseParameter(const CMouse &comMouse)
+{
+    createMessage(
+        QApplication::translate("UIMessageCenter", "Mouse failure ..."),
+        QApplication::translate("UIMessageCenter", "Failed to assign mouse parameter.") +
+        UIErrorString::formatErrorInfo(comMouse));
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h	(revision 98502)
+++ trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h	(revision 98503)
@@ -73,4 +73,5 @@
 class CEmulatedUSB;
 class CKeyboard;
+class CMouse;
 class CNetworkAdapter;
 class CVirtualBox;
@@ -385,4 +386,7 @@
           * @param  comKeyboard  Brings the object parameter being changed for. */
         static void cannotChangeKeyboardParameter(const CKeyboard &comKeyboard);
+        /** Notifies about inability to change IMouse parameter.
+          * @param  comMouse  Brings the object parameter being changed for. */
+        static void cannotChangeMouseParameter(const CMouse &comMouse);
         /** Notifies about inability to change IVirtualSystemDescription parameter.
           * @param  comVsd  Brings the object parameter being changed for. */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.cpp	(revision 98502)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.cpp	(revision 98503)
@@ -48,4 +48,5 @@
 #include "UIDnDMIMEData.h"
 #endif /* VBOX_WITH_DRAG_AND_DROP_GH */
+#include "UIMachine.h"
 #include "UIMessageCenter.h"
 #include "UISession.h"
@@ -80,6 +81,7 @@
 
 
-UIDnDHandler::UIDnDHandler(UISession *pSession, QWidget *pParent)
-    : m_pSession(pSession)
+UIDnDHandler::UIDnDHandler(UIMachine *pMachine, UISession *pSession, QWidget *pParent)
+    : m_pMachine(pMachine)
+    , m_pSession(pSession)
     , m_pParent(pParent)
     , m_fDataRetrieved(false)
@@ -754,6 +756,5 @@
         /* Send a mouse event with released mouse buttons into the guest that triggers
          * the "drop" event in our proxy window on the guest. */
-        AssertPtr(m_pSession);
-        m_pSession->mouse().PutMouseEvent(0, 0, 0, 0, 0);
+        m_pMachine->putMouseEvent(0, 0, 0, 0, 0);
 
         msgCenter().showModalProgressDialog(progress,
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.h	(revision 98502)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.h	(revision 98503)
@@ -46,4 +46,5 @@
 
 class UIDnDMIMEData;
+class UIMachine;
 class UISession;
 
@@ -57,5 +58,5 @@
 public:
 
-    UIDnDHandler(UISession *pSession, QWidget *pParent);
+    UIDnDHandler(UIMachine *pMachine, UISession *pSession, QWidget *pParent);
     virtual ~UIDnDHandler(void);
 
@@ -133,5 +134,7 @@
 protected:
 
-    /** Pointer to UI session. */
+    /** Pointer to machine UI. */
+    UIMachine        *m_pMachine; 
+    /** Pointer to session UI. */
     UISession        *m_pSession;
     /** Pointer to parent widget. */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp	(revision 98502)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp	(revision 98503)
@@ -59,4 +59,5 @@
 #include "CHostVideoInputDevice.h"
 #include "CMachine.h"
+#include "CMediumAttachment.h"
 #include "CNetworkAdapter.h"
 #include "CProgress.h"
@@ -466,4 +467,19 @@
 {
     uisession()->putUsageCode(iUsageCode, iUsagePage, fKeyRelease);
+}
+
+void UIMachine::putMouseEvent(LONG iDx, LONG iDy, LONG iDz, LONG iDw, LONG iButtonState)
+{
+    uisession()->putMouseEvent(iDx, iDy, iDz, iDw, iButtonState);
+}
+
+void UIMachine::putMouseEventAbsolute(LONG iX, LONG iY, LONG iDz, LONG iDw, LONG iButtonState)
+{
+    uisession()->putMouseEventAbsolute(iX, iY, iDz, iDw, iButtonState);
+}
+
+void UIMachine::putEventMultiTouch(LONG iCount, const QVector<LONG64> &contacts, BOOL fIsTouchScreen, ULONG uScanTime)
+{
+    uisession()->putEventMultiTouch(iCount, contacts, fIsTouchScreen, uScanTime);
 }
 
@@ -1748,9 +1764,9 @@
 void UIMachine::updateMouseState()
 {
-    m_fIsMouseSupportsAbsolute = uisession()->mouse().GetAbsoluteSupported();
-    m_fIsMouseSupportsRelative = uisession()->mouse().GetRelativeSupported();
-    m_fIsMouseSupportsTouchScreen = uisession()->mouse().GetTouchScreenSupported();
-    m_fIsMouseSupportsTouchPad = uisession()->mouse().GetTouchPadSupported();
-    m_fIsMouseHostCursorNeeded = uisession()->mouse().GetNeedsHostCursor();
+    m_fIsMouseSupportsAbsolute = uisession()->getAbsoluteSupported();
+    m_fIsMouseSupportsRelative = uisession()->getRelativeSupported();
+    m_fIsMouseSupportsTouchScreen = uisession()->getTouchScreenSupported();
+    m_fIsMouseSupportsTouchPad = uisession()->getTouchPadSupported();
+    m_fIsMouseHostCursorNeeded = uisession()->getNeedsHostCursor();
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h	(revision 98502)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h	(revision 98503)
@@ -43,5 +43,4 @@
 /* COM includes: */
 #include "COMEnums.h"
-#include "CMediumAttachment.h"
 
 /* Forward declarations: */
@@ -50,4 +49,8 @@
 class UISession;
 class UIMachineLogic;
+class CMediumAttachment;
+class CNetworkAdapter;
+class CUSBDevice;
+class CVirtualBoxErrorInfo;
 #ifdef VBOX_WS_MAC
  class QMenuBar;
@@ -370,4 +373,11 @@
         /** Returns mouse-state. */
         int mouseState() const { return m_iMouseState; }
+
+        /** Sends relative mouse move event to VM's mouse. */
+        void putMouseEvent(LONG iDx, LONG iDy, LONG iDz, LONG iDw, LONG iButtonState);
+        /** Sends absolute mouse move event to VM's mouse. */
+        void putMouseEventAbsolute(LONG iX, LONG iY, LONG iDz, LONG iDw, LONG iButtonState);
+        /** Sends multi-touch event to VM's mouse. */
+        void putEventMultiTouch(LONG iCount, const QVector<LONG64> &contacts, BOOL fIsTouchScreen, ULONG uScanTime);
     /** @} */
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 98502)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 98503)
@@ -307,9 +307,4 @@
 {
     return uisession()->guest();
-}
-
-CMouse& UIMachineLogic::mouse() const
-{
-    return uisession()->mouse();
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h	(revision 98502)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h	(revision 98503)
@@ -128,6 +128,4 @@
     /** Returns the console's guest reference. */
     CGuest& guest() const;
-    /** Returns the console's mouse reference. */
-    CMouse& mouse() const;
     /** Returns the console's debugger reference. */
     CMachineDebugger& debugger() const;
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 98502)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 98503)
@@ -1328,5 +1328,5 @@
 
     /* Create the drag and drop handler instance: */
-    m_pDnDHandler = new UIDnDHandler(uisession(), this /* pParent */);
+    m_pDnDHandler = new UIDnDHandler(uimachine(), uisession(), this /* pParent */);
     if (m_pDnDHandler)
     {
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp	(revision 98502)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp	(revision 98503)
@@ -59,5 +59,4 @@
 /* COM includes: */
 #include "CDisplay.h"
-#include "CMouse.h"
 
 /* Other VBox includes: */
@@ -202,5 +201,5 @@
 
         /* Switch guest mouse to the relative mode: */
-        mouse().PutMouseEvent(0, 0, 0, 0, 0);
+        uimachine()->putMouseEvent(0, 0, 0, 0, 0);
 
         /* Notify all the listeners: */
@@ -409,5 +408,5 @@
         releaseMouse();
         /* Also we should switch guest mouse to the absolute mode: */
-        mouse().PutMouseEventAbsolute(-1, -1, 0, 0, 0);
+        uimachine()->putMouseEventAbsolute(-1, -1, 0, 0, 0);
     }
 #if 0 /* current team's decision is NOT to capture mouse on mouse-absolute mode loosing! */
@@ -438,5 +437,5 @@
     {
         /* Switch guest mouse to the relative mode: */
-        mouse().PutMouseEvent(0, 0, 0, 0, 0);
+        uimachine()->putMouseEvent(0, 0, 0, 0, 0);
     }
 #endif
@@ -556,9 +555,4 @@
 {
     return machineLogic()->uisession()->display();
-}
-
-CMouse &UIMouseHandler::mouse() const
-{
-    return machineLogic()->uisession()->mouse();
 }
 
@@ -984,7 +978,7 @@
 
         /* Pass event to the guest: */
-        mouse().PutMouseEvent(globalPos.x() - m_lastMousePos.x(),
-                              globalPos.y() - m_lastMousePos.y(),
-                              iWheelVertical, iWheelHorizontal, iMouseButtonsState);
+        uimachine()->putMouseEvent(globalPos.x() - m_lastMousePos.x(),
+                                   globalPos.y() - m_lastMousePos.y(),
+                                   iWheelVertical, iWheelHorizontal, iMouseButtonsState);
 
 #ifdef VBOX_WS_WIN
@@ -1152,5 +1146,5 @@
 
             /* Post absolute mouse-event into guest: */
-            mouse().PutMouseEventAbsolute(cpnt.x() + 1, cpnt.y() + 1, iWheelVertical, iWheelHorizontal, iMouseButtonsState);
+            uimachine()->putMouseEventAbsolute(cpnt.x() + 1, cpnt.y() + 1, iWheelVertical, iWheelHorizontal, iMouseButtonsState);
             return true;
         }
@@ -1274,8 +1268,8 @@
     }
 
-    mouse().PutEventMultiTouch(pTouchEvent->touchPoints().size(),
-                               contacts,
-                               fTouchScreen,
-                               (ULONG)RTTimeMilliTS());
+    uimachine()->putEventMultiTouch(pTouchEvent->touchPoints().size(),
+                                    contacts,
+                                    fTouchScreen,
+                                    (ULONG)RTTimeMilliTS());
 
     /* Eat by default? */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h	(revision 98502)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h	(revision 98503)
@@ -50,5 +50,4 @@
 class UIMachineWindow;
 class CDisplay;
-class CMouse;
 
 
@@ -112,6 +111,4 @@
     /** Returns the console's display reference. */
     CDisplay &display() const;
-    /** Returns the console's mouse reference. */
-    CMouse &mouse() const;
 
     /* Event handler for registered machine-view(s): */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 98502)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 98503)
@@ -304,4 +304,53 @@
     if (!comKeyboard.isOk())
         UINotificationMessage::cannotChangeKeyboardParameter(comKeyboard);
+}
+
+BOOL UISession::getAbsoluteSupported()
+{
+    return mouse().GetAbsoluteSupported();
+}
+
+BOOL UISession::getRelativeSupported()
+{
+    return mouse().GetRelativeSupported();
+}
+
+BOOL UISession::getTouchScreenSupported()
+{
+    return mouse().GetTouchScreenSupported();
+}
+
+BOOL UISession::getTouchPadSupported()
+{
+    return mouse().GetTouchPadSupported();
+}
+
+BOOL UISession::getNeedsHostCursor()
+{
+    return mouse().GetNeedsHostCursor();
+}
+
+void UISession::putMouseEvent(LONG iDx, LONG iDy, LONG iDz, LONG iDw, LONG iButtonState)
+{
+    CMouse comMouse = mouse();
+    comMouse.PutMouseEvent(iDx, iDy, iDz, iDw, iButtonState);
+    if (!comMouse.isOk())
+        UINotificationMessage::cannotChangeMouseParameter(comMouse);
+}
+
+void UISession::putMouseEventAbsolute(LONG iX, LONG iY, LONG iDz, LONG iDw, LONG iButtonState)
+{
+    CMouse comMouse = mouse();
+    comMouse.PutMouseEventAbsolute(iX, iY, iDz, iDw, iButtonState);
+    if (!comMouse.isOk())
+        UINotificationMessage::cannotChangeMouseParameter(comMouse);
+}
+
+void UISession::putEventMultiTouch(LONG iCount, const QVector<LONG64> &contacts, BOOL fIsTouchScreen, ULONG uScanTime)
+{
+    CMouse comMouse = mouse();
+    comMouse.PutEventMultiTouch(iCount, contacts, fIsTouchScreen, uScanTime);
+    if (!comMouse.isOk())
+        UINotificationMessage::cannotChangeMouseParameter(comMouse);
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h	(revision 98502)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h	(revision 98503)
@@ -247,4 +247,25 @@
     /** @} */
 
+    /** @name Mouse stuff.
+     ** @{ */
+        /** Returns whether VM's mouse supports absolute coordinates. */
+        BOOL getAbsoluteSupported();
+        /** Returns whether VM's mouse supports relative coordinates. */
+        BOOL getRelativeSupported();
+        /** Returns whether VM's mouse supports touch screen device. */
+        BOOL getTouchScreenSupported();
+        /** Returns whether VM's mouse supports touch pad device. */
+        BOOL getTouchPadSupported();
+        /** Returns whether VM's mouse requires host cursor. */
+        BOOL getNeedsHostCursor();
+
+        /** Sends relative mouse move event to VM's mouse. */
+        void putMouseEvent(LONG iDx, LONG iDy, LONG iDz, LONG iDw, LONG iButtonState);
+        /** Sends absolute mouse move event to VM's mouse. */
+        void putMouseEventAbsolute(LONG iX, LONG iY, LONG iDz, LONG iDw, LONG iButtonState);
+        /** Sends multi-touch event to VM's mouse. */
+        void putEventMultiTouch(LONG iCount, const QVector<LONG64> &contacts, BOOL fIsTouchScreen, ULONG uScanTime);
+    /** @} */
+
     /** @name Guest additions stuff.
      ** @{ */
