Index: /trunk/src/VBox/Additions/x11/VBoxClient/display.cpp
===================================================================
--- /trunk/src/VBox/Additions/x11/VBoxClient/display.cpp	(revision 55201)
+++ /trunk/src/VBox/Additions/x11/VBoxClient/display.cpp	(revision 55202)
@@ -86,5 +86,5 @@
 /** Tell the VBoxGuest driver we no longer want any events and tell the host
  * we no longer support any capabilities. */
-static int disableEventsAndCaps()
+static int disableEventsAndCaps(bool fDisableEvents)
 {
     int rc = VbglR3SetGuestCaps(0, VMMDEV_GUEST_SUPPORTS_GRAPHICS);
@@ -94,6 +94,6 @@
     if (RT_FAILURE(rc))
         VBClFatalError(("Failed to unset mouse status, rc=%Rrc.\n", rc));
-    rc = VbglR3CtlFilterMask(0,  VMMDEV_EVENT_MOUSE_CAPABILITIES_CHANGED
-                                | VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST);
+    if (fDisableEvents)
+        rc = VbglR3CtlFilterMask(0, VMMDEV_EVENT_MOUSE_CAPABILITIES_CHANGED | VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST);
     if (RT_FAILURE(rc))
         VBClFatalError(("Failed to unset filter mask, rc=%Rrc.\n", rc));
@@ -385,5 +385,5 @@
     if (!pSelf->mfInit)
         return VERR_WRONG_ORDER;
-    return disableEventsAndCaps();
+    return disableEventsAndCaps(false);
 }
 
@@ -400,5 +400,5 @@
 {
     NOREF(ppInterface);
-    disableEventsAndCaps();
+    disableEventsAndCaps(true);
     VbglR3Term();
 }
