Index: /trunk/src/VBox/Main/include/ConsoleImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 52925)
+++ /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 52926)
@@ -1001,53 +1001,4 @@
     ComObjPtr<Progress> mptrCancelableProgress;
 
-    /* The purpose of caching of some events is probably in order to
-       automatically fire them at new event listeners.  However, there is no
-       (longer?) any code making use of this... */
-#ifdef CONSOLE_WITH_EVENT_CACHE
-    struct
-    {
-        /** OnMousePointerShapeChange() cache */
-        struct
-        {
-            bool valid;
-            bool visible;
-            bool alpha;
-            uint32_t xHot;
-            uint32_t yHot;
-            uint32_t width;
-            uint32_t height;
-            com::SafeArray<BYTE> shape;
-        } mpsc;
-
-        /** OnMouseCapabilityChange() cache */
-        struct
-        {
-            bool valid;
-            BOOL supportsAbsolute;
-            BOOL supportsRelative;
-            BOOL needsHostCursor;
-        } mcc;
-
-        /** OnKeyboardLedsChange() cache */
-        struct
-        {
-            bool valid;
-            bool numLock;
-            bool capsLock;
-            bool scrollLock;
-        } klc;
-
-        void clear()
-        {
-            RT_ZERO(mcc);
-            RT_ZERO(klc);
-
-            /* We cannot RT_ZERO mpsc because of shape's vtable. */
-            mpsc.shape.setNull();
-            mpsc.valid = mpsc.visible = mpsc.alpha = false;
-            mpsc.xHot = mpsc.yHot = mpsc.width = mpsc.height = 0;
-        }
-    } mCallbackData;
-#endif
     ComPtr<IEventListener> mVmListener;
 
Index: /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp	(revision 52925)
+++ /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp	(revision 52926)
@@ -806,8 +806,4 @@
     unconst(mEventSource).setNull();
 
-#ifdef CONSOLE_WITH_EVENT_CACHE
-    mCallbackData.clear();
-#endif
-
     LogFlowThisFuncLeave();
 }
@@ -6338,9 +6334,4 @@
 }
 
-#ifdef CONSOLE_WITH_EVENT_CACHE
-/**
- * @note Locks this object for writing.
- */
-#endif
 void Console::i_onMousePointerShapeChange(bool fVisible, bool fAlpha,
                                           uint32_t xHot, uint32_t yHot,
@@ -6357,29 +6348,4 @@
     AssertComRCReturnVoid(autoCaller.rc());
 
-#ifdef CONSOLE_WITH_EVENT_CACHE
-    {
-        /* We need a write lock because we alter the cached callback data */
-        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-        /* Save the callback arguments */
-        mCallbackData.mpsc.visible = fVisible;
-        mCallbackData.mpsc.alpha = fAlpha;
-        mCallbackData.mpsc.xHot = xHot;
-        mCallbackData.mpsc.yHot = yHot;
-        mCallbackData.mpsc.width = width;
-        mCallbackData.mpsc.height = height;
-
-        /* start with not valid */
-        bool wasValid = mCallbackData.mpsc.valid;
-        mCallbackData.mpsc.valid = false;
-
-        com::SafeArray<BYTE> aShape(ComSafeArrayInArg(pShape));
-        if (aShape.size() != 0)
-            mCallbackData.mpsc.shape.initFrom(aShape);
-        else
-            mCallbackData.mpsc.shape.resize(0);
-        mCallbackData.mpsc.valid = true;
-    }
-#endif
     com::SafeArray<BYTE> aShape(ComSafeArrayInArg(pShape));
     if (!mMouse.isNull())
@@ -6394,9 +6360,4 @@
 }
 
-#ifdef CONSOLE_WITH_EVENT_CACHE
-/**
- * @note Locks this object for writing.
- */
-#endif
 void Console::i_onMouseCapabilityChange(BOOL supportsAbsolute, BOOL supportsRelative,
                                         BOOL supportsMT, BOOL needsHostCursor)
@@ -6407,17 +6368,4 @@
     AutoCaller autoCaller(this);
     AssertComRCReturnVoid(autoCaller.rc());
-
-#ifdef CONSOLE_WITH_EVENT_CACHE
-    {
-        /* We need a write lock because we alter the cached callback data */
-        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-        /* save the callback arguments */
-        mCallbackData.mcc.supportsAbsolute = supportsAbsolute;
-        mCallbackData.mcc.supportsRelative = supportsRelative;
-        mCallbackData.mcc.needsHostCursor = needsHostCursor;
-        mCallbackData.mcc.valid = true;
-    }
-#endif
 
     fireMouseCapabilityChangedEvent(mEventSource, supportsAbsolute, supportsRelative, supportsMT, needsHostCursor);
@@ -6454,26 +6402,8 @@
 }
 
-#ifdef CONSOLE_WITH_EVENT_CACHE
-/**
- * @note Locks this object for writing.
- */
-#endif
 void Console::i_onKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock)
 {
     AutoCaller autoCaller(this);
     AssertComRCReturnVoid(autoCaller.rc());
-
-#ifdef CONSOLE_WITH_EVENT_CACHE
-    {
-        /* We need a write lock because we alter the cached callback data */
-        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-        /* save the callback arguments */
-        mCallbackData.klc.numLock = fNumLock;
-        mCallbackData.klc.capsLock = fCapsLock;
-        mCallbackData.klc.scrollLock = fScrollLock;
-        mCallbackData.klc.valid = true;
-    }
-#endif
 
     fireKeyboardLedsChangedEvent(mEventSource, fNumLock, fCapsLock, fScrollLock);
@@ -7529,9 +7459,4 @@
     else
         mVMDestroying = false;
-
-#ifdef CONSOLE_WITH_EVENT_CACHE
-    if (SUCCEEDED(rc))
-        mCallbackData.clear();
-#endif
 
     LogFlowThisFuncLeave();
